About json scheam to xml schema

I’m working on translate json schema to xml schema, and I get confused about below.
1.What should "default": {} and "$ref": "#" be like in xml schema?
2. I see the conversion mappings in page https://www.oxygenxml.com/doc/versions/22.1/ug-editor/topics/xsd-to-json-schema-converter-x.html shows that object and array are both translate to anyType in xml schema in oxygen xml editor, but these two are recursive definition right? The value part of object could be a object and the item of array could be array right? But anyType in xml schema doesn’t conclude object and array(according to https://www.w3.org/TR/xmlschema-2/#built-in-datatypes).
3.how to translate the logic of anyOf to xml schema, like the example below:

"items": {
    "anyOf": [
        { "$ref": "#" },
        { "$ref": "#/definitions/schemaArray" }
    "default": {}

could someone help me? thanks.


I’m not sure I can follow. Can you add some more information on the context of your problem and where ROOT comes into play?



If you want to use JSON with ROOT, you probably want to check TBufferJSON class. It provides possibility to store arbitrary C++ object into JSON and already has its own referencing schema, which can be decoded using JSROOT functions.