JsonPathConverter
Class JsonPathConverter
A JsonConverter that support json path expression in JsonProperty attributes.
Inherited Members
JsonConverter.CanRead
JsonConverter.CanWrite
Namespace: ETLBox.Json
Assembly: ETLBox.Json.dll
Syntax
Remarks
Examples
[JsonConverter(typeof(JsonPathConverter))]
public class MySimpleRow
{
[JsonProperty("Column1")]
public int Col1 { get; set; }
[JsonProperty("Column2.Value")]
public string Col2 { get; set; }
}
Methods
CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration
Parameters
Type | Name | Description |
---|---|---|
Type | objectType | Type of the object. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
ReadJson(JsonReader, Type, object, JsonSerializer)
Reads the JSON representation of the object.
Declaration
Parameters
Type | Name | Description |
---|---|---|
JsonReader | reader | The Newtonsoft.Json.JsonReader to read from. |
Type | objectType | Type of the object. |
object | existingValue | The existing value of object being read. |
JsonSerializer | serializer | The calling serializer. |
Returns
Type | Description |
---|---|
object | The object value. |
Overrides
WriteJson(JsonWriter, object, JsonSerializer)
Writes the JSON representation of the object.
Declaration
Parameters
Type | Name | Description |
---|---|---|
JsonWriter | writer | The Newtonsoft.Json.JsonWriter to write to. |
object | value | The value. |
JsonSerializer | serializer | The calling serializer. |