Query regarding Xsd to Json conversion

28 views
Skip to first unread message

kilapar...@gmail.com

unread,
Sep 4, 2017, 6:35:18 AM9/4/17
to JSON Schema

Hi All,

  I am using Xsd2Json conversion from https://github.com/dswarm/dswarm-xsd2jsonschema   but   How can i get simple type with restrictions elements from xsd to Json .Now I am getting null value for those types.Example for the type i want to get is given below.

<xs:element name="friend-of" maxOccurs="unbounded" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
       <xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>


Thanks in Advance,
Regards,
Kilaparthi Ramu.

Ben Hutton (@Relequestual)

unread,
Sep 4, 2017, 6:44:09 AM9/4/17
to JSON Schema, kilapar...@gmail.com
Sorry I don't know xsd in enough detail to understand your question.
That isn't the only tool that does xsd to JSON schema, so you might want to check out some others.

You're unlikely to find authors of those tools in this group. You should ask whoever created the tool for help using their specific tool.

JSON Schema is not intended to be feature equivalent with XML Schema. There are features in one but not in the other. It's likely that you would have to edit the result by hand (and read and understand the JSON Schema specification). You probably cannot do this automatically in many cases.

Cheers
Ben
Reply all
Reply to author
Forward
0 new messages