Class ValueOrPropertyConverter
Json converter for retrieving specified property if the token is an object.
Namespace: TehGM.Wolfringo.Messages.Serialization.Internal
Assembly: Wolfringo.Core.dll
Syntax
public class ValueOrPropertyConverter : JsonConverter
Constructors
| Improve this Doc View SourceValueOrPropertyConverter(String)
Json converter for retrieving specified property if the token is an object.
Declaration
public ValueOrPropertyConverter(string propertyPath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | propertyPath | Path to the property to retrieve if token is an object. |
Methods
| Improve this Doc View SourceCanConvert(Type)
Json converter for retrieving specified property if the token is an object.
Declaration
public override bool CanConvert(Type objectType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | objectType |
Returns
| Type | Description |
|---|---|
| System.Boolean |
ReadJson(JsonReader, Type, Object, JsonSerializer)
Json converter for retrieving specified property if the token is an object.
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonReader | reader | |
| System.Type | objectType | |
| System.Object | existingValue | |
| JsonSerializer | serializer |
Returns
| Type | Description |
|---|---|
| System.Object |
WriteJson(JsonWriter, Object, JsonSerializer)
Json converter for retrieving specified property if the token is an object.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonWriter | writer | |
| System.Object | value | |
| JsonSerializer | serializer |