Add JSONValidate function

Description

Add a JSONValidate function with the same or similar syntax to the XmlValidate function ( http://docs.lucee.org/reference/functions/xmlvalidate.html ).

The function would take a JSON document and a JSON schema and validate the document against the schema. The function should return a structure containing:

  • Errors

  • Status

  • Warning

or similar appropriate elements.

The JSON schema documentation can be found here:

http://json-schema.org/

Activity

Show:
Zac Spitzer
May 25, 2020, 6:10 PM
Edited

the extension name, description is a bit vague, user might assume it’s needed for standard json functions, like the image extension

also the lex contains json-extension.fld twice in the same folder

Andrew Dixon
May 25, 2020, 8:05 PM

- On https://download.lucee.org/ the extension is described as "JSON functions" so is this just the validate function or ALL JSON functions?

Zac Spitzer
May 25, 2020, 8:11 PM

just ValidateJson

Andrew Dixon
May 25, 2020, 8:17 PM

Ok, then I agree the naming and description are confusing, unless the plan is to move all JSON functions to the extension.

Zac Spitzer
May 25, 2020, 8:42 PM

We'll need to include that extension manually in docs so it appears

Fixed

Assignee

Michael Offner

Reporter

Andrew Dixon

Labels

None

Sprint

None

Fix versions

Priority

New
Configure