CrystalJsonSettingsExtensions

Namespace: SnowBank.Data.Json · class

Methods

AsMutable

static CrystalJsonSettings AsMutable(CrystalJsonSettings settings)

Returns a variant of these settings that parses JSON documents as mutable

All other settings are unmodified

AsReadOnly

static CrystalJsonSettings AsReadOnly(CrystalJsonSettings settings)

Returns a variant of these settings that parses JSON documents as read-only

All other settings are unmodified

static CrystalJsonSettings AsReadOnly(CrystalJsonSettings settings, bool readOnly)

Returns a variant of these settings that parses JSON documents as either read-only or mutable

All other settings are unmodified

GetKeyComparer

static IEqualityComparer<string> GetKeyComparer(CrystalJsonSettings settings)

Returns either Ordinal or OrdinalIgnoreCase depending on the value of IgnoreCaseForNames

IncludesNullMembers

static bool IncludesNullMembers(CrystalJsonSettings settings)

Tests if the settings specify whether reference type properties and fields should be included when null

Example: The property string? Name { get; ... }, when its value is null, should always be written when the return value is , or skipped if

IsCompactLayout

static bool IsCompactLayout(CrystalJsonSettings settings)

IsFormattedLayout

static bool IsFormattedLayout(CrystalJsonSettings settings)

IsIndentedLayout

static bool IsIndentedLayout(CrystalJsonSettings settings)

IsJavascriptTarget

static bool IsJavascriptTarget(CrystalJsonSettings settings)

IsJsonTarget

static bool IsJsonTarget(CrystalJsonSettings settings)

IsReadOnly

static bool IsReadOnly(CrystalJsonSettings settings)

Tests if the settings specify whether the parsed JSON document will be read-only or mutable