Class KeyAndValueDictionaryConverter<TKey, TValue>
Json converter using property names as keys and their nested properties as values.
Inheritance
System.Object
KeyAndValueDictionaryConverter<TKey, TValue>
Namespace: TehGM.Wolfringo.Messages.Serialization.Internal
Assembly: Wolfringo.Core.dll
Syntax
public class KeyAndValueDictionaryConverter<TKey, TValue> : JsonConverter
Type Parameters
| Name | Description |
|---|---|
| TKey | |
| TValue |
Constructors
| Improve this Doc View SourceKeyAndValueDictionaryConverter()
Json converter using property names as keys and their nested properties as values.
Declaration
public KeyAndValueDictionaryConverter()
KeyAndValueDictionaryConverter(String)
Json converter using property names as keys and their nested properties as values.
Declaration
public KeyAndValueDictionaryConverter(string valuePropertyPath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | valuePropertyPath | Path of property to use as a value. |
Methods
| Improve this Doc View SourceCanConvert(Type)
Json converter using property names as keys and their nested properties as values.
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 using property names as keys and their nested properties as values.
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 using property names as keys and their nested properties as values.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonWriter | writer | |
| System.Object | value | |
| JsonSerializer | serializer |