ISO20022.XSD
Convert ISO 20022 XSD schemas into a JSON form model.
ISO20022.XSD is a .NET library that converts XSD schemas into JSON, bridging the gap between form data and financial messaging standards. It is the piece that lets a UI render an ISO 20022 message without anyone hand-transcribing a schema into form fields.
What it does
- Convert ISO 20022 XSD into a JSON model the form components can render
Install
.NET CLI
dotnet add package ISO20022.XSDPackage Manager
Install-Package ISO20022.XSDConvert ISO 20022 XSD to JSON
using ISO20022.XSD;
string xsdFileName = "camt.053.001.10.xsd";
var fileInfo = new FileInfo(xsdFileName);
if (File.Exists(xsdFileName) && fileInfo.Extension.Equals(".xsd"))
{
XsdToJson xsdLib = new(xsdFileName);
xsdLib.Convert();
File.AppendAllText(fileInfo.FullName.Replace(".xsd", ".json"), xsdLib.SchemaJson);
}Resulting JSON schema
Each element carries its own constraints — occurrence, length, pattern, numeric precision and enumerated values — so validation rules travel with the structure rather than being reimplemented in the UI.
{
"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": [
...
]
}
}Next step
Running this in production?
We wrote these libraries and we run them. If you are planning an ISO 20022 migration, we can tell you quickly where the hard parts actually are.