Class ExpandoJsonPathConverter

Allows to pass JsonPath string that are applied for particular property names - this will work one on the first level of the

Inheritance
JsonConverter
ExpandoJsonPathConverter
Namespace: ETLBox.Json
Assembly: ETLBox.Json.dll
Syntax
    public class ExpandoJsonPathConverter : JsonConverter
Remarks

Constructors

ExpandoJsonPathConverter(IEnumerable<JsonProperty2JsonPath>)

Declaration
    public ExpandoJsonPathConverter(IEnumerable<JsonProperty2JsonPath> pathLookups)
Parameters
TypeNameDescription
IEnumerable<JsonProperty2JsonPath>pathLookups

Properties

CanWrite

Gets a value indicating whether this Newtonsoft.Json.JsonConverter can write JSON.

Declaration
    public override bool CanWrite { get; }
Property Value
TypeDescription
bool

true if this Newtonsoft.Json.JsonConverter can write JSON; otherwise, false.

Overrides
Newtonsoft.Json.JsonConverter.CanWrite

PathLookups

Declaration
    public IEnumerable<JsonProperty2JsonPath> PathLookups { get; set; }
Property Value
TypeDescription
IEnumerable<JsonProperty2JsonPath>

Methods

CanConvert(Type)

Determines whether this instance can convert the specified object type.

Declaration
    public override bool CanConvert(Type objectType)
Parameters
TypeNameDescription
TypeobjectType

Type of the object.

Returns
TypeDescription
bool

true if this instance can convert the specified object type; otherwise, false.

Overrides

ReadJson(JsonReader, Type, object, JsonSerializer)

Reads the JSON representation of the object.

Declaration
    public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
TypeNameDescription
JsonReaderreader

The Newtonsoft.Json.JsonReader to read from.

TypeobjectType

Type of the object.

objectexistingValue

The existing value of object being read.

JsonSerializerserializer

The calling serializer.

Returns
TypeDescription
object

The object value.

Overrides

WriteJson(JsonWriter, object, JsonSerializer)

Writes the JSON representation of the object.

Declaration
    public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
TypeNameDescription
JsonWriterwriter

The Newtonsoft.Json.JsonWriter to write to.

objectvalue

The value.

JsonSerializerserializer

The calling serializer.

Overrides