KGySoft.Json Namespace

The KGySoft.Json namespace contains types that make possible in-memory JSON manipulation (LINQ to JSON), similarly to the System.Xml.Linq namespace for XML content.
See the Remarks section of the JsonValue struct for details and examples.

Classes

JsonArray Represents a JSON array, interpreted as a list of JsonValue elements. Use the ToString or WriteTo methods to convert it to JSON.
JsonModule Represents the KGySoft.Json module.
JsonObject Represents a JSON object, interpreted as a string-JsonValue dictionary and also as a list of JsonProperty elements. Use the ToString or WriteTo methods to convert it to JSON.
JsonValueExtensions Provides extension methods for JsonValue conversions.

Structures

JsonProperty Represents a property in a JsonObject.
JsonValue Represents a value that can be converted to JSON. It can hold JavaScript primitive types such as Null, Boolean, Number and String, and it can be assigned also from JsonArray and JsonObject types. Its default value represents the JavaScript Undefined value. Use the ToString or WriteTo methods to convert it to JSON.

Enumerations

JsonDateTimeFormat Specifies how DateTime, DateTimeOffset and DateOnly instances are formatted and parsed by the JsonValueExtensions methods.
JsonEnumFormat Specifies how .NET enums (assuming conventional C# Pascal casing) are formatted when converted to JSON by the ToJsonTEnum(TEnum, JsonEnumFormat, String) extension method.
JsonTimeFormat Specifies how TimeSpan and TimeOnly instances are formatted and parsed by the JsonValueExtensions methods.
JsonValueType Represents the possible values of the Type property of a JsonValue instance.