Skip to content
  • Erik Froseth's avatar
    2016175b
    WL#11999 Add support for JSON Schema · 2016175b
    Erik Froseth authored
    This patch adds the function JSON_SCHEMA_VALID(<json doc>, <json doc>) that
    validates a JSON document against a JSON schema. A JSON schema is a
    JSON document that describes the general structure of a JSON document.
    The JSON schema can be used to enfore different things like:
    
    - Required properties
    - Numbers within a range
    - Strings must match a regular expression
    - And much more
    
    The JSON Schema validator uses std::regex in order to do pattern
    matching in those cases where it's used. It rejects JSON Schema
    definitions that contain references to remote documents. In order to
    re-use some of the JSON syntax checking, we move some existing code
    out of json_dom.h/cc and into a separate file json_syntax_check.h/cc.
    
    Change-Id: Idde632ae11c5ba8992e77e77f214e74ecfe367c3
    2016175b
    WL#11999 Add support for JSON Schema
    Erik Froseth authored
    This patch adds the function JSON_SCHEMA_VALID(<json doc>, <json doc>) that
    validates a JSON document against a JSON schema. A JSON schema is a
    JSON document that describes the general structure of a JSON document.
    The JSON schema can be used to enfore different things like:
    
    - Required properties
    - Numbers within a range
    - Strings must match a regular expression
    - And much more
    
    The JSON Schema validator uses std::regex in order to do pattern
    matching in those cases where it's used. It rejects JSON Schema
    definitions that contain references to remote documents. In order to
    re-use some of the JSON syntax checking, we move some existing code
    out of json_dom.h/cc and into a separate file json_syntax_check.h/cc.
    
    Change-Id: Idde632ae11c5ba8992e77e77f214e74ecfe367c3
Loading