XSDService 1.3.0
Suggested Alternatives
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package XSDService --version 1.3.0
NuGet\Install-Package XSDService -Version 1.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XSDService" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XSDService --version 1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XSDService, 1.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XSDService as a Cake Addin #addin nuget:?package=XSDService&version=1.3.0 // Install XSDService as a Cake Tool #tool nuget:?package=XSDService&version=1.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Xsd To Json Converter
This will help to convert any XSD to JSON
Install package
- Install the
XSDService
NuGet package.
- .NET CLI
dotnet add package XSDService --version 1.1.4
- PackageManager
Install-Package XSDService -Version 1.1.4
Usage
using XSDService;
var fileInfo = new FileInfo(fileName);
if (File.Exists(fileName) && fileInfo.Extension.Equals(".xsd"))
{
XsdToJson xsdLib = new(fileName);
xsdLib.Convert();
File.AppendAllText(fileInfo.FullName.Replace(".xsd", ".json"), xsdLib.SchemaJson);
}
Model of JSON
public class XsdSchema
{
public string Namespace { get; set; }
public SchemaElement SchemaElement { get; set; }
}
public class SchemaElement
{
public string Id { get; set; }
public string Name { get; set; }
public string DataType { get; set; }
public string MinOccurs { get; set; }
public string MaxOccurs { get; set; }
public string MinLength { get; set; }
public string MaxLength { get; set; }
public string Pattern { get; set; }
public string FractionDigits { get; set; }
public string TotalDigits { get; set; }
public string MinInclusive { get; set; }
public string MaxInclusive { get; set; }
public string[] Values { get; set; }
public bool IsCurrency { get; set; }
public string XPath { get; set; }
public List<SchemaElement> Elements { get; set; }
}
Example
{
"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":[
...
]
}
}
Changes
Version 1.3.0 release
- New output model.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.3.6 | 6,307 | 8/31/2024 | |
1.3.5 | 5,142 | 8/6/2024 | |
1.3.4 | 106 | 8/6/2024 | |
1.3.3 | 109 | 8/6/2024 | |
1.3.2 | 96 | 8/6/2024 | |
1.3.1 | 92 | 8/4/2024 | |
1.3.0 | 71 | 7/29/2024 | |
1.2.1 | 87 | 7/28/2024 | |
1.2.0 | 121 | 7/22/2024 | |
1.1.4 | 218 | 10/28/2023 | |
1.1.3 | 194 | 8/13/2023 | |
1.1.2 | 172 | 8/13/2023 | |
1.1.1 | 172 | 8/11/2023 | |
1.1.0 | 185 | 8/10/2023 |