ISO20022.XSD is a powerful .NET library that converts XSD schemas into JSON format, enabling seamless data manipulation and integration. Ideal for developers working with ISO 20022 standards.This robust solution bridges the gap between form data and financial messaging standards, making the development process more efficient and straightforward.
dotnet add package ISO20022.XSD
Install-Package ISO20022.XSD
using ISO20022.XSD;
string xsdFileName = "camt.053.001.10.xsd";
var fileInfo = new FileInfo(xsdFileName);
if (File.Exists(fileName) && fileInfo.Extension.Equals(".xsd"))
{
XsdToJson xsdLib = new(fileName);
xsdLib.Convert();
File.AppendAllText(fileInfo.FullName.Replace(".xsd", ".json"), xsdLib.SchemaJson);
}
{
"namespace": "urn:iso:std:iso:20022:tech:xsd:camt.053.001.10",
"schemaElement": {
"id": "Document",
"name": "Document",
"dataType": null,
"minOccurs": "1",
"maxOccurs": null,
"minLength": null,
"maxLength": null,
"pattern": null,
"fractionDigits": null,
"totalDigits": null,
"minInclusive": null,
"maxInclusive": null,
"values": null,
"isCurrency": false,
"xpath": "Document",
"elements":[
...
]
}
}