IJsonConverter

Description

interface Tinman.Core.Json.IJsonConverter<T>

Extended by

ITypeSerializerEx

Base interface for classes that convert between atomic values and JSON objects.

Public / Methods

Json​Read​Checked


public method JsonReadChecked → (2)

value in : IJsonValue

The JSON object or null.

hasValue out : bool

true if a value has been read from value in,
false if no value has been read.

returns → T

The read value.

Reads a value from the given JSON object.

Json​Write


public method JsonWrite → (2)

value in : T

The value to write.

output opt : JsonValue = null

Optional output value to use.

returns → JsonValue

The written JSON object or null.

Writes the given value to a JSON object.

Extensions

Json​Read


public static method JsonRead → (2)<T>

value in : IJsonValue

The JSON object or null.

defaultValue opt : T = default(T)

The default value to use if value in is invalid.

returns → T

The read value.

Reads a value from the given JSON object.