Class JsonPathConverter

A JsonConverter that support json path expression in JsonProperty attributes.

Inheritance
System.Object
Newtonsoft.Json.JsonConverter
JsonPathConverter
Inherited Members
Newtonsoft.Json.JsonConverter.CanRead
Newtonsoft.Json.JsonConverter.CanWrite
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.Helper
Assembly: ETLBox.Json.dll
Syntax
    public class JsonPathConverter : JsonConverter
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)

Declaration
    public override bool CanConvert(Type objectType)
Parameters
TypeNameDescription
System.TypeobjectType
Returns
TypeDescription
System.Boolean
Overrides
Newtonsoft.Json.JsonConverter.CanConvert(System.Type)

ReadJson(JsonReader, Type, Object, JsonSerializer)

Declaration
    public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
TypeNameDescription
Newtonsoft.Json.JsonReaderreader
System.TypeobjectType
System.ObjectexistingValue
Newtonsoft.Json.JsonSerializerserializer
Returns
TypeDescription
System.Object
Overrides
Newtonsoft.Json.JsonConverter.ReadJson(Newtonsoft.Json.JsonReader, System.Type, System.Object, Newtonsoft.Json.JsonSerializer)

WriteJson(JsonWriter, Object, JsonSerializer)

Declaration
    public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
TypeNameDescription
Newtonsoft.Json.JsonWriterwriter
System.Objectvalue
Newtonsoft.Json.JsonSerializerserializer
Overrides
Newtonsoft.Json.JsonConverter.WriteJson(Newtonsoft.Json.JsonWriter, System.Object, Newtonsoft.Json.JsonSerializer)