HyperDev.Text.Json.Transform
1.2.5
dotnet add package HyperDev.Text.Json.Transform --version 1.2.5
NuGet\Install-Package HyperDev.Text.Json.Transform -Version 1.2.5
<PackageReference Include="HyperDev.Text.Json.Transform" Version="1.2.5" />
<PackageVersion Include="HyperDev.Text.Json.Transform" Version="1.2.5" />
<PackageReference Include="HyperDev.Text.Json.Transform" />
paket add HyperDev.Text.Json.Transform --version 1.2.5
#r "nuget: HyperDev.Text.Json.Transform, 1.2.5"
#:package HyperDev.Text.Json.Transform@1.2.5
#addin nuget:?package=HyperDev.Text.Json.Transform&version=1.2.5
#tool nuget:?package=HyperDev.Text.Json.Transform&version=1.2.5
HyperDev.Text.Json.Transform
JsonTransform and the JSON Schema helpers built on Newtonsoft.Json.Schema, part of the HyperDev Fatum framework.
It contains what was in the Schema and Transformation folders of HyperDev.Text.Json, so that HyperDev.Text.Json
no longer depends on Newtonsoft.Json.Schema. The namespaces are unchanged (HyperDev.Text.Json, HyperDev.Text.Json.Schema).
- JSON Schema helpers: parsing, validation with readable errors, defaults and constants, dereferencing, comparison
- Schema inference from sample data (JSON, data readers, XML, XSD, text) and sample generation
- JSON transformation and expression evaluation (
JsonTransform), with the schema of the results - JSON with comments (
JTokenCommentHelper, formerly part ofJTokenHelper),JTokenInstance,XmlConverter
Installation
dotnet add package HyperDev.Text.Json.Transform
Quick start
using HyperDev.Text.Json.Schema;
using Newtonsoft.Json.Linq;
if (JSchemaHelper.TryParse(@"{ ""type"": ""object"", ""required"": [""name""] }", out var schema))
{
var data = JToken.Parse(@"{ ""age"": 42 }");
if (!schema.IsValid(data, out var errors))
{
foreach (var error in errors)
Console.WriteLine($"{error.Path}: {error.Message}");
}
}
Newtonsoft.Json.Schema license
This package depends on Newtonsoft.Json.Schema, which is commercial software (or AGPL-3.0).
Without a license key it works within the free quota: 1,000 validations and 10 schema generations per hour, then it throws JSchemaException.
The key is never stored in this package. Provide your own in one of these ways:
Environment variable (read automatically when the library loads), checked in this order:
NEWTONSOFT_JSON_SCHEMA_LICENSEJSONSCHEMA_LICENSE<EntryAssemblyName>_JSONSCHEMA
From code, for example when the key comes from configuration or a key vault:
HyperDev.Text.Json.JsonSchemaLicense.Register(configuration["JsonSchema:License"]);
JsonSchemaLicense.IsRegistered tells whether a key has been registered in the current process.
Libraries that need validating readers or schema generators should create them with
JSchemaHelper.CreateValidatingReader(...) and JSchemaHelper.CreateGenerator(), so the license is registered first.
Target frameworks
.NET 8.0, .NET 10.0
License
MIT, © Ivan Senatore, Wemake Informatica srl. Third-party dependencies keep their own licenses (Newtonsoft.Json: MIT, Antlr4.Runtime: BSD-3-Clause, Newtonsoft.Json.Schema: commercial or AGPL-3.0).
| 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Antlr4.Runtime (>= 4.6.6)
- HyperDev.Core (>= 1.2.4)
- HyperDev.Data (>= 1.2.4)
- HyperDev.Text.Json (>= 1.2.4)
- HyperDev.Text.Json.Schema (>= 1.2.0)
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.4)
- Newtonsoft.Json.Schema (>= 4.0.1)
-
net8.0
- Antlr4.Runtime (>= 4.6.6)
- HyperDev.Core (>= 1.2.4)
- HyperDev.Data (>= 1.2.4)
- HyperDev.Text.Json (>= 1.2.4)
- HyperDev.Text.Json.Schema (>= 1.2.0)
- NETStandard.Library (>= 2.0.3)
- Newtonsoft.Json (>= 13.0.4)
- Newtonsoft.Json.Schema (>= 4.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.