# Class NpgsqlJsonGeometryWktReaderWriter

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite.dll

Reads and writes JSON using the well-known-text format for NetTopologySuite.Geometries.Geometry values.

    public sealed class NpgsqlJsonGeometryWktReaderWriter : JsonValueReaderWriter<Geometry>

Inheritance
  object
  JsonValueReaderWriter
  JsonValueReaderWriter<Geometry>
  NpgsqlJsonGeometryWktReaderWriter

Inherited Members
  JsonValueReaderWriter<Geometry>.FromJson(ref Utf8JsonReaderManager, object)
  JsonValueReaderWriter<Geometry>.ToJson(Utf8JsonWriter, object)
  JsonValueReaderWriter<Geometry>.ValueType
  JsonValueReaderWriter.FromJsonString(string, object)
  JsonValueReaderWriter.ToJsonString(object)
  JsonValueReaderWriter.CreateFromType(Type)
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.ReferenceEquals(object, object)
  object.ToString()

## Properties

### Instance

The singleton instance of this stateless reader/writer.

    public static NpgsqlJsonGeometryWktReaderWriter Instance { get; }

#### Property Value

NpgsqlJsonGeometryWktReaderWriter

## Methods

### FromJsonTyped(ref Utf8JsonReaderManager, object?)

Reads the value from JSON.

    public override Geometry FromJsonTyped(ref Utf8JsonReaderManager manager, object? existingObject = null)

#### Parameters

`manager` Utf8JsonReaderManager

  The Utf8JsonReaderManager for the JSON being read.

`existingObject` object

  Can be used to update an existing object, rather than create a new one.

#### Returns

Geometry

  The read value.

#### Remarks

The CurrentReader is at the node that contains the value to be read. The value should be read as appropriate from the JSON, and then further converted as necessary.

Nulls are handled externally to this reader. That is, this method will never be called if the JSON value is "null".

In most cases, the value is represented in the JSON document as a simple property value--e.g. a number, boolean, or string. However, it could be an array or sub-document. In this case, the Utf8JsonReaderManager should be used to parse the JSON as appropriate.

### ToJsonTyped(Utf8JsonWriter, Geometry)

Writes the value to JSON.

    public override void ToJsonTyped(Utf8JsonWriter writer, Geometry value)

#### Parameters

`writer` Utf8JsonWriter

  The Utf8JsonWriter into which the value should be written.

`value` Geometry

  The value to write.