JsonTokenType Enum

Definition

Defines the various JSON tokens that make up a JSON text.

public enum JsonTokenType
Inheritance
JsonTokenType

Fields

Name Value Description
None 0

There is no value (as distinct from Null). This is the default token type if no data has been read by the Utf8JsonReader.

StartObject 1

The token type is the start of a JSON object.

EndObject 2

The token type is the end of a JSON object.

StartArray 3

The token type is the start of a JSON array.

EndArray 4

The token type is the end of a JSON array.

PropertyName 5

The token type is a JSON property name.

Comment 6

The token type is a comment string.

String 7

The token type is a JSON string.

Number 8

The token type is a JSON number.

True 9

The token type is the JSON literal true.

False 10

The token type is the JSON literal false.

Null 11

The token type is the JSON literal null.

Remarks

For more information, see How to write custom serializers and deserializers with System.Text.Json.

Applies to

Prodotto Versioni
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)