C# 클래스 formulate.app.Serialization.FieldsJsonConverter

Handles conversion of JSON to IFormField[].
This conversion is necessary to instantiate concrete instances of the IFormField interface. By avoiding embedding the full type name in the JSON, we can refactor names of classes without preventing deserialization later.
상속: Newtonsoft.Json.JsonConverter
파일 보기 프로젝트 열기: rhythmagency/formulate

공개 메소드들

메소드 설명
CanConvert ( Type objectType ) : bool

Indicates whether or not this class can convert an object of the specified type.

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

Deserializes JSON into an array of IFormField.

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

This does nothing (it must be implemented because it is abstract in the base class).

비공개 메소드들

메소드 설명
InstantiateFieldByTypeId ( System.Guid typeId ) : IFormField

Creates a new instance of a form field by the field's type ID.

메소드 상세

CanConvert() 공개 메소드

Indicates whether or not this class can convert an object of the specified type.
public CanConvert ( Type objectType ) : bool
objectType System.Type
리턴 bool

ReadJson() 공개 메소드

Deserializes JSON into an array of IFormField.
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() 공개 메소드

This does nothing (it must be implemented because it is abstract in the base class).
public WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void
writer Newtonsoft.Json.JsonWriter
value object
serializer Newtonsoft.Json.JsonSerializer
리턴 void