Last active
September 16, 2021 11:00
-
-
Save lhns/8c08d42486020a61eecec02adc3ffaa0 to your computer and use it in GitHub Desktop.
JSON Schema for lossless XML to JSON conversion and vice versa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "$ref": "#/definitions/node", | |
| "definitions": { | |
| "node": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "type": "string" | |
| }, | |
| "namespace": { | |
| "type": [ | |
| "string", | |
| "null" | |
| ] | |
| }, | |
| "attributes": { | |
| "type": [ | |
| "object", | |
| "null" | |
| ], | |
| "propertyNames": { | |
| "type": "string" | |
| }, | |
| "patternProperties": { | |
| "": { | |
| "type": "string" | |
| } | |
| } | |
| }, | |
| "children": { | |
| "type": [ | |
| "array", | |
| "null" | |
| ], | |
| "items": { | |
| "anyOf": [ | |
| { | |
| "$ref": "#/definitions/node" | |
| }, | |
| { | |
| "type": "string" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ], | |
| "additionalProperties": false | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment