EntityKeyMemberConverter Class

Namespace: Stimulsoft.Base.Json.Converters

Converts an Entity Framework EntityKey to and from JSON.

Inheritance

Inherits from: JsonConverter

Methods

Method Returns Description
CanConvert bool Determines whether this instance can convert the specified object type.
ReadJson object Reads the JSON representation of the object.
WriteJson void Writes the JSON representation of the object.

Method Details

CanConvert

CanConvert(objectType: Type): bool

Determines whether this instance can convert the specified object type.

Parameters

  • objectType (Type) — Type of the object.

Returns bool — true if this instance can convert the specified object type; otherwise, false.


ReadJson

ReadJson(reader: JsonReader, objectType: Type, existingValue: object, serializer: JsonSerializer): object

Reads the JSON representation of the object.

Parameters

  • reader (JsonReader) — The JsonReader to read from.
  • objectType (Type) — Type of the object.
  • existingValue (object) — The existing value of object being read.
  • serializer (JsonSerializer) — The calling serializer.

Returns object — The object value.


WriteJson

WriteJson(writer: JsonWriter, value: object, serializer: JsonSerializer): void

Writes the JSON representation of the object.

Parameters

  • writer (JsonWriter) — The JsonWriter to write to.
  • value (object) — The value.
  • serializer (JsonSerializer) — The calling serializer.