Skip to content

JSON Schema Generation

highsource edited this page Apr 27, 2015 · 10 revisions

JSON Schema generation

Warning: JSON Schema generation is an experimental feature. Please use with caution and file issues if you encounter any problems.

Jsonix Schema Compiler supports the generation of the JSON Schema alongside with Jsonix mappings. The generated JSON Schema naturally matches the generated Jsonix mappings. It can be used to validate JavaScript objects after you unmarshall them from XML or before you marshall the as XML.

Generating JSON Schema

In order to turn on JSON Schema generation,

  • Use -generateJsonSchema or -Xjsonix-generateJsonSchema command line options or XJC plugin arguments.
  • Alternatively add <jsonix:jsonSchema .../> to your configuration on the top level or within <jsonix:module .../> configuration elements.
Clone this wiki locally