My application support XML and JSON content type. I have XSD to validate XML content. I want to convert XSD to create a JSON Schema. Can I achieve this functionality in using C# ?
Asked
Active
Viewed 7,482 times
1
-
1possible duplicate of [Generate Json schema from XML schema (XSD)](http://stackoverflow.com/questions/3922026/generate-json-schema-from-xml-schema-xsd) – Rich Sep 01 '15 at 22:57
1 Answers
1
There is a commercial .NET library XsdToJsonSchema that converts from XSD to JSON schema that seems to be close to what you are looking for. A code snippet from its page:
string xsd = File.ReadAllText("XMLFile1.xsd");
string jsonSchema = XsdToJsonSchema.XsdToJsonSchemaConverter.ConvertXsdToJsonSchema(xsd);

Atanas Krachev
- 102
- 4