JsonhCs 1.4.0
dotnet add package JsonhCs --version 1.4.0
NuGet\Install-Package JsonhCs -Version 1.4.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="JsonhCs" Version="1.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JsonhCs" Version="1.4.0" />
<PackageReference Include="JsonhCs" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JsonhCs --version 1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: JsonhCs, 1.4.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.
#addin nuget:?package=JsonhCs&version=1.4.0
#tool nuget:?package=JsonhCs&version=1.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
JsonhCs
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 is an implementation of JSONH v1.
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 = 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- BigReal (>= 4.1.0)
- LinkDotNet.StringBuilder (>= 2.4.1)
- ResultZero (>= 3.0.0)
- System.Text.Json (>= 9.0.3)
-
net9.0
- BigReal (>= 4.1.0)
- LinkDotNet.StringBuilder (>= 2.4.1)
- ResultZero (>= 3.0.0)
- System.Text.Json (>= 9.0.3)
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.