# Class JsonBitArrayReaderWriter

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Json

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public sealed class JsonBitArrayReaderWriter : JsonValueReaderWriter<BitArray>

Inheritance
  object
  JsonValueReaderWriter
  JsonValueReaderWriter<BitArray>
  JsonBitArrayReaderWriter

Inherited Members
  JsonValueReaderWriter<BitArray>.FromJson(ref Utf8JsonReaderManager, object)
  JsonValueReaderWriter<BitArray>.ToJson(Utf8JsonWriter, object)
  JsonValueReaderWriter<BitArray>.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

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public static JsonBitArrayReaderWriter Instance { get; }

#### Property Value

JsonBitArrayReaderWriter

## Methods

### FromJsonTyped(ref Utf8JsonReaderManager, object?)

Reads the value from JSON.

    public override BitArray 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

BitArray

  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, BitArray)

Writes the value to JSON.

    public override void ToJsonTyped(Utf8JsonWriter writer, BitArray value)

#### Parameters

`writer` Utf8JsonWriter

  The Utf8JsonWriter into which the value should be written.

`value` BitArray

  The value to write.