JsonhCs 3.6.0
dotnet add package JsonhCs --version 3.6.0
NuGet\Install-Package JsonhCs -Version 3.6.0
<PackageReference Include="JsonhCs" Version="3.6.0" />
<PackageVersion Include="JsonhCs" Version="3.6.0" />
<PackageReference Include="JsonhCs" />
paket add JsonhCs --version 3.6.0
#r "nuget: JsonhCs, 3.6.0"
#addin nuget:?package=JsonhCs&version=3.6.0
#tool nuget:?package=JsonhCs&version=3.6.0
<img src="https://github.com/jsonh-org/Jsonh/blob/main/IconUpscaled.png?raw=true" width=180>
JSON for Humans.
JSON is great. Until you miss that trailing comma... or want to use comments. What about multiline strings? JSONH provides a much more elegant way to write JSON that's designed for humans rather than machines.
Since JSONH is compatible with JSON, any JSONH syntax can be represented with equivalent JSON.
JsonhCs
JsonhCs is a parser implementation of JSONH v1 for C# .NET.
Example
{
// use #, // or /**/ comments
// quotes are optional
keys: without quotes,
// commas are optional
isn\'t: {
that: cool? # yes
}
// use multiline strings
haiku: '''
Let me die in spring
beneath the cherry blossoms
while the moon is full.
'''
// compatible with JSON5
key: 0xDEADCAFE
// or use JSON
"old school": 1337
}
Usage
Everything you need is contained within JsonhReader
:
string Jsonh = """
{
this is: awesome
}
""";
string Element = JsonhCs.JsonhReader.ParseElement<string>(Jsonh).Value!;
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 is compatible. 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 was computed. 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. |
-
net8.0
- BigReal (>= 4.1.0)
- LinkDotNet.StringBuilder (>= 2.4.1)
- ResultZero (>= 3.0.0)
- System.Text.Json (>= 9.0.5)
-
net9.0
- BigReal (>= 4.1.0)
- LinkDotNet.StringBuilder (>= 2.4.1)
- ResultZero (>= 3.0.0)
- System.Text.Json (>= 9.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on JsonhCs:
Package | Downloads |
---|---|
SystemCall
A command-parsing library inspired by Jinx. |
GitHub repositories
This package is not used by any popular GitHub repositories.