Skip to main content

NewtonPositionConverter

Namespace: Meshmakers.Octo.Runtime.Contracts.Geospatial.Converters

Converter to read and write an IPosition, that is, the coordinates of a Point.

public class NewtonPositionConverter : JsonConverter

Inheritance Object → JsonConverter → NewtonPositionConverter

Properties​

CanRead​

public bool CanRead { get; }

Property Value​

Boolean

CanWrite​

public bool CanWrite { get; }

Property Value​

Boolean

Constructors​

NewtonPositionConverter()​

public NewtonPositionConverter()

Methods​

CanConvert(Type)​

Determines whether this instance can convert the specified object type.

public bool CanConvert(Type objectType)

Parameters​

objectType Type
Type of the object.

Returns​

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

ReadJson(JsonReader, Type, Object, JsonSerializer)​

Reads the JSON representation of the object.

public object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)

Parameters​

reader JsonReader
The to read from.

objectType Type
Type of the object.

existingValue Object
The existing value of object being read.

serializer JsonSerializer
The calling serializer.

Returns​

Object
The object value.

WriteJson(JsonWriter, Object, JsonSerializer)​

Writes the JSON representation of the object.

public void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)

Parameters​

writer JsonWriter
The to write to.

value Object
The value.

serializer JsonSerializer
The calling serializer.