Skip to main content
validatePolicyJSON(policy, existingPolicy?): Either<RulesError[], PolicyJSON>
Defined in: src/modules/validation.ts:698 Parses a JSON string and returns Either a PolicyJSON object or an error.

Parameters

ParameterTypeDescription
policystringstring to be parsed.
existingPolicy?PolicyJSONoptional existing policy data to merge with for update operations.

Returns

Either<RulesError[], PolicyJSON> Either the parsed PolicyJSON object or an error.