NFX.Serialization.JSON NamespaceNFX Class Library

[This is preliminary documentation and is subject to change.]

Provides JSON+ serialization functionality
Classes

  ClassDescription
Public classJSONDataArray
Represents a data transfer object (DTO) JSON array, that holds a list of values
Public classJSONDataMap
Represents a data transfer object (DTO) JSON map, that associates keys with values
Public classJSONDeserializationException
Base exception thrown by the JSON when deserializing objects
Public classJSONDynamicObject
Implements a JSON dynamic object that shapes itself at runtime
Public classJSONException
Base exception thrown by the JSON serialization format
Public classJSONExtensions
Provides JSON extension methods
Public classJSONReader
Provides deserialization functionality from JSON format
Public classJSONSerializationException
Base exception thrown by the JSON when serializing objects
Public classJSONWriter
Writes primitive types, JSONDataObjects, JSONDynamicObjects, IEnumerable and IDictionary - implementers into string or stream. Can also write IJSONWritable-implementing types that directly serialize their state into JSON. This class does not serialize regular CLR types (that do not implement IJSONWritable), use JSONSerializer for full functionality
Public classJSONWritingOptions
Specifies how JSON should be written as text. Use JSONWritingOptions.Compact or JSONWritingOptions.PrettyPrint static properties for typical options
Structures

  StructureDescription
Public structureNLSMap
Represents a JSON-serializable structure that keys [N]ame and [D]escription on lang ISO. It respects JSONWritingOptions.NLSMapLanguageISO and NLSMapLanguageISODefault
Public structureNLSMap Builder
Facilitates the population of NLSMap from code
Public structureNLSMap NDPair
Localized Name:Description pair
Interfaces

  InterfaceDescription
Public interfaceIJSONDataObject
Represents a data transfer object (DTO) abstraction used to read/write JSON data
Public interfaceIJSONReadable
Denotes a CLR type-safe entity (class or struct) that can directly read itself from IJSONDataObject which is supplied by JSON parser. This mechanism bypasses all of the reflection/dynamic code. This approach may be far more performant for some classes that need to de-serialize their state/data from JSON format, than relying on general-purpose JSON serializer that can deserialize any type but is slower. The particular type has to be allocated first, then it's instance can be hydrated with data/state using this method
Public interfaceIJSONWritable
Denotes a CLR type-safe entity (class or struct) that can directly write itself as JSON content string. This mechanism bypasses all of the reflection/dynamic code. This approach may be far more performant for some classes that need to serialize their state/data in JSON format, than relying on general-purpose JSON serializer that can serialize any type but is slower
Enumerations

  EnumerationDescription
Public enumerationJSONDynamicObjectKind
Specifies what kind the dynamic object is - map or array
Public enumerationJSONSerializationPurpose
Specifies the purpose of JSON serialization so the level of detail may be dynamically adjusted. Depending on this parameter IJSONWritable implementors may include additional details that are otherwise not needed
Public enumerationNLSMap GetParts