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# ?
答案 0 :(得分:1)
有一个商业.NET库XsdToJsonSchema,它可以从XSD转换为JSON模式,这似乎与您要查找的内容很接近。页面上的代码段:
string xsd = File.ReadAllText("XMLFile1.xsd");
string jsonSchema = XsdToJsonSchema.XsdToJsonSchemaConverter.ConvertXsdToJsonSchema(xsd);