C# Класс LtiLibrary.Core.Common.JsonLdObjectConverter

Serialize a JsonLdObject to JSON representation.
Collects JsonLdObject Terms and writes them first as @context. Does not convert JSON to a JsonLdObject.
Наследование: Newtonsoft.Json.JsonConverter
Показать файл Открыть проект

Открытые методы

Метод Описание
CanConvert ( Type objectType ) : bool
ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void

Writes the JSON representation of the object.

Приватные методы

Метод Описание
GetExternalContextId ( IJsonLdObject obj ) : Uri

Get the external context from this object.

GetTerms ( IJsonLdObject obj ) : string>.IDictionary

Collect the terms from the JsonLdObject and all its child properties.

Описание методов

CanConvert() публичный Метод

public CanConvert ( Type objectType ) : bool
objectType System.Type
Результат bool

ReadJson() публичный Метод

public ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
reader Newtonsoft.Json.JsonReader
objectType System.Type
existingValue object
serializer Newtonsoft.Json.JsonSerializer
Результат object

WriteJson() публичный Метод

Writes the JSON representation of the object.
public WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void
writer Newtonsoft.Json.JsonWriter The Newtonsoft.Json.JsonWriter to write to.
value object The value.
serializer Newtonsoft.Json.JsonSerializer The calling serializer.
Результат void