1

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# ?

Sabby62
  • 1,707
  • 3
  • 24
  • 37
  • 1
    possible 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 Answers1

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);