Generate XML schema(XSD) from JSON schema

21,022

Looks like you found the Altova suite of tools. Those are great, but they're not free.

There are a couple of ways to go about this, that I can think of.

  1. There's jsons2xsd - note, I have not used that, so I can't say anything about it; but it looks like the lib is under active development, which is good.
  2. A possible roundabout way of getting your XSD is to start with a json doc (not the jsonschema) that's pretty complete and conformant to your jsonschema, use any of a multitude of json to xml converters, and convert your xml to xsd (one such tool here).

Hope that helps.

Share:
21,022
Anthony Wang
Author by

Anthony Wang

Updated on July 06, 2022

Comments

  • Anthony Wang
    Anthony Wang almost 2 years

    Does anybody know how to generate a XML schema(XSD file) from an existing JSON schema? Are there any tools available for this? On-line tools are preferred, I have found a free trial tool called Altova. THX.