validatePolicyJSON(Defined in: src/modules/validation.ts:698 Parses a JSON string and returns Either a PolicyJSON object or an error.policy,existingPolicy?):Either<RulesError[],PolicyJSON>
Parameters
| Parameter | Type | Description |
|---|---|---|
policy | string | string to be parsed. |
existingPolicy? | PolicyJSON | optional existing policy data to merge with for update operations. |
Returns
Either<RulesError[], PolicyJSON>
Either the parsed PolicyJSON object or an error.