@tsonic/dotnet-pure
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library) - CLR naming
760 lines (653 loc) • 40.4 kB
TypeScript
// Generated by tsbindgen - Architecture
// Namespace: System.Text.Json
// Assembly: System.Text.Json
// Branded primitive types are sourced from @tsonic/types
import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/types';
// Import support types from @tsonic/types
import type { ptr, ref } from "@tsonic/types";
// Import types from other namespaces
import type { IBufferWriter_1, ReadOnlySequence_1 } from "../../System.Buffers/internal/index.js";
import * as System_Collections_Generic_Internal from "../../System.Collections.Generic/internal/index.js";
import type { IAsyncEnumerable_1, IEnumerable_1, IEnumerator_1, IList_1 } from "../../System.Collections.Generic/internal/index.js";
import * as System_Collections_Internal from "../../System.Collections/internal/index.js";
import type { IDictionary, IEnumerable, IEnumerator } from "../../System.Collections/internal/index.js";
import type { PipeReader, PipeWriter } from "../../System.IO.Pipelines/internal/index.js";
import type { Stream } from "../../System.IO/internal/index.js";
import type { MethodBase } from "../../System.Reflection/internal/index.js";
import * as System_Runtime_Serialization_Internal from "../../System.Runtime.Serialization/internal/index.js";
import type { ISerializable, SerializationInfo, StreamingContext } from "../../System.Runtime.Serialization/internal/index.js";
import type { JavaScriptEncoder } from "../../System.Text.Encodings.Web/internal/index.js";
import type { JsonNode } from "../../System.Text.Json.Nodes/internal/index.js";
import type { IJsonTypeInfoResolver, JsonTypeInfo, JsonTypeInfo_1 } from "../../System.Text.Json.Serialization.Metadata/internal/index.js";
import type { JsonConverter, JsonIgnoreCondition, JsonNumberHandling, JsonObjectCreationHandling, JsonSerializerContext, JsonUnknownTypeHandling, JsonUnmappedMemberHandling, ReferenceHandler } from "../../System.Text.Json.Serialization/internal/index.js";
import type { Task, Task_1, ValueTask, ValueTask_1 } from "../../System.Threading.Tasks/internal/index.js";
import type { CancellationToken } from "../../System.Threading/internal/index.js";
import * as System_Internal from "../../System/internal/index.js";
import type { Boolean as ClrBoolean, Byte, Char, DateTime, DateTimeOffset, Decimal, Double, Enum, Exception, Guid, IAsyncDisposable, IComparable, IConvertible, IDisposable, IEquatable_1, IFormatProvider, IFormattable, Int16, Int32, Int64, ISpanFormattable, Nullable_1, Object as ClrObject, ReadOnlyMemory_1, ReadOnlySpan_1, SByte, SequencePosition, Single, Span_1, String as ClrString, Type, TypeCode, UInt16, UInt32, UInt64, ValueType, Void } from "../../System/internal/index.js";
// CLROf<T> - Maps ergonomic primitives to their CLR types for generic constraints
// This utility is used ONLY in generic type arguments to satisfy CLR interface constraints
// Value positions (parameters, return types) use lowercase primitives for ergonomics
export type CLROf<T> =
T extends sbyte ? System_Internal.SByte :
T extends short ? System_Internal.Int16 :
T extends int ? System_Internal.Int32 :
T extends long ? System_Internal.Int64 :
T extends int128 ? System_Internal.Int128 :
T extends nint ? System_Internal.IntPtr :
T extends byte ? System_Internal.Byte :
T extends ushort ? System_Internal.UInt16 :
T extends uint ? System_Internal.UInt32 :
T extends ulong ? System_Internal.UInt64 :
T extends uint128 ? System_Internal.UInt128 :
T extends nuint ? System_Internal.UIntPtr :
T extends half ? System_Internal.Half :
T extends float ? System_Internal.Single :
T extends double ? System_Internal.Double :
T extends decimal ? System_Internal.Decimal :
T extends char ? System_Internal.Char :
T extends boolean ? System_Internal.Boolean :
T extends string ? System_Internal.String :
T; // Identity fallback for non-primitive types
export enum JsonCommentHandling {
Disallow = 0,
Skip = 1,
Allow = 2
}
export enum JsonSerializerDefaults {
General = 0,
Web = 1,
Strict = 2
}
export enum JsonTokenType {
None = 0,
StartObject = 1,
EndObject = 2,
StartArray = 3,
EndArray = 4,
PropertyName = 5,
Comment = 6,
String = 7,
Number = 8,
True = 9,
False = 10,
Null = 11
}
export enum JsonValueKind {
Undefined = 0,
Object = 1,
Array = 2,
String = 3,
Number = 4,
True = 5,
False = 6,
Null = 7
}
export interface JsonDocumentOptions$instance {
AllowDuplicateProperties: boolean;
AllowTrailingCommas: boolean;
CommentHandling: JsonCommentHandling;
MaxDepth: int;
}
export const JsonDocumentOptions: {
new(): JsonDocumentOptions$instance;
};
export type JsonDocumentOptions = JsonDocumentOptions$instance;
export interface JsonElement$instance {
readonly Item: JsonElement;
readonly ValueKind: JsonValueKind;
Clone(): JsonElement;
EnumerateArray(): JsonElement_ArrayEnumerator;
EnumerateObject(): JsonElement_ObjectEnumerator;
GetArrayLength(): int;
GetBoolean(): boolean;
GetByte(): byte;
GetBytesFromBase64(): byte[];
GetDateTime(): DateTime;
GetDateTimeOffset(): DateTimeOffset;
GetDecimal(): decimal;
GetDouble(): double;
GetGuid(): Guid;
GetInt16(): short;
GetInt32(): int;
GetInt64(): long;
GetProperty(propertyName: string): JsonElement;
GetProperty(propertyName: ReadOnlySpan_1<CLROf<char>>): JsonElement;
GetProperty(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>): JsonElement;
GetPropertyCount(): int;
GetRawText(): string;
GetSByte(): sbyte;
GetSingle(): float;
GetString(): string;
GetUInt16(): ushort;
GetUInt32(): uint;
GetUInt64(): ulong;
ToString(): string;
TryGetByte(value: { value: ref<byte> }): boolean;
TryGetBytesFromBase64(value: { value: ref<byte[]> }): boolean;
TryGetDateTime(value: { value: ref<DateTime> }): boolean;
TryGetDateTimeOffset(value: { value: ref<DateTimeOffset> }): boolean;
TryGetDecimal(value: { value: ref<decimal> }): boolean;
TryGetDouble(value: { value: ref<double> }): boolean;
TryGetGuid(value: { value: ref<Guid> }): boolean;
TryGetInt16(value: { value: ref<short> }): boolean;
TryGetInt32(value: { value: ref<int> }): boolean;
TryGetInt64(value: { value: ref<long> }): boolean;
TryGetProperty(propertyName: string, value: { value: ref<JsonElement> }): boolean;
TryGetProperty(propertyName: ReadOnlySpan_1<CLROf<char>>, value: { value: ref<JsonElement> }): boolean;
TryGetProperty(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: { value: ref<JsonElement> }): boolean;
TryGetSByte(value: { value: ref<sbyte> }): boolean;
TryGetSingle(value: { value: ref<float> }): boolean;
TryGetUInt16(value: { value: ref<ushort> }): boolean;
TryGetUInt32(value: { value: ref<uint> }): boolean;
TryGetUInt64(value: { value: ref<ulong> }): boolean;
ValueEquals(text: string): boolean;
ValueEquals(utf8Text: ReadOnlySpan_1<CLROf<byte>>): boolean;
ValueEquals(text: ReadOnlySpan_1<CLROf<char>>): boolean;
WriteTo(writer: Utf8JsonWriter): void;
}
export const JsonElement: {
new(): JsonElement$instance;
DeepEquals(element1: JsonElement, element2: JsonElement): boolean;
Parse(utf8Json: ReadOnlySpan_1<CLROf<byte>>, options?: JsonDocumentOptions): JsonElement;
Parse(json: ReadOnlySpan_1<CLROf<char>>, options?: JsonDocumentOptions): JsonElement;
Parse(json: string, options?: JsonDocumentOptions): JsonElement;
ParseValue(reader: { value: ref<Utf8JsonReader> }): JsonElement;
TryParseValue(reader: { value: ref<Utf8JsonReader> }, element: { value: ref<Nullable_1<JsonElement>> }): boolean;
};
export type JsonElement = JsonElement$instance;
export interface JsonElement_ArrayEnumerator$instance extends IDisposable {
readonly Current: JsonElement;
Dispose(): void;
GetEnumerator(): JsonElement_ArrayEnumerator;
MoveNext(): boolean;
Reset(): void;
}
export const JsonElement_ArrayEnumerator: {
new(): JsonElement_ArrayEnumerator$instance;
};
export interface __JsonElement_ArrayEnumerator$views {
As_IEnumerable_1(): System_Collections_Generic_Internal.IEnumerable_1$instance<JsonElement>;
As_IEnumerator_1(): System_Collections_Generic_Internal.IEnumerator_1$instance<JsonElement>;
As_IEnumerable(): System_Collections_Internal.IEnumerable$instance;
As_IEnumerator(): System_Collections_Internal.IEnumerator$instance;
}
export type JsonElement_ArrayEnumerator = JsonElement_ArrayEnumerator$instance & __JsonElement_ArrayEnumerator$views;
export interface JsonElement_ObjectEnumerator$instance extends IDisposable {
readonly Current: JsonProperty;
Dispose(): void;
GetEnumerator(): JsonElement_ObjectEnumerator;
MoveNext(): boolean;
Reset(): void;
}
export const JsonElement_ObjectEnumerator: {
new(): JsonElement_ObjectEnumerator$instance;
};
export interface __JsonElement_ObjectEnumerator$views {
As_IEnumerable_1(): System_Collections_Generic_Internal.IEnumerable_1$instance<JsonProperty>;
As_IEnumerator_1(): System_Collections_Generic_Internal.IEnumerator_1$instance<JsonProperty>;
As_IEnumerable(): System_Collections_Internal.IEnumerable$instance;
As_IEnumerator(): System_Collections_Internal.IEnumerator$instance;
}
export type JsonElement_ObjectEnumerator = JsonElement_ObjectEnumerator$instance & __JsonElement_ObjectEnumerator$views;
export interface JsonEncodedText$instance {
readonly EncodedUtf8Bytes: ReadOnlySpan_1<CLROf<byte>>;
readonly Value: string;
Equals(other: JsonEncodedText): boolean;
Equals(obj: unknown): boolean;
GetHashCode(): int;
ToString(): string;
}
export const JsonEncodedText: {
new(): JsonEncodedText$instance;
Encode(utf8Value: ReadOnlySpan_1<CLROf<byte>>, encoder?: JavaScriptEncoder): JsonEncodedText;
Encode(value: ReadOnlySpan_1<CLROf<char>>, encoder?: JavaScriptEncoder): JsonEncodedText;
Encode(value: string, encoder?: JavaScriptEncoder): JsonEncodedText;
};
export interface __JsonEncodedText$views {
As_IEquatable_1(): System_Internal.IEquatable_1$instance<JsonEncodedText>;
// Structural method bridges for numeric interface constraints
Equals(other: JsonEncodedText): boolean;
}
export type JsonEncodedText = JsonEncodedText$instance & __JsonEncodedText$views;
export interface JsonProperty$instance {
readonly Name: string;
readonly Value: JsonElement;
NameEquals(text: string): boolean;
NameEquals(utf8Text: ReadOnlySpan_1<CLROf<byte>>): boolean;
NameEquals(text: ReadOnlySpan_1<CLROf<char>>): boolean;
ToString(): string;
WriteTo(writer: Utf8JsonWriter): void;
}
export const JsonProperty: {
new(): JsonProperty$instance;
};
export type JsonProperty = JsonProperty$instance;
export interface JsonReaderOptions$instance {
AllowMultipleValues: boolean;
AllowTrailingCommas: boolean;
CommentHandling: JsonCommentHandling;
MaxDepth: int;
}
export const JsonReaderOptions: {
new(): JsonReaderOptions$instance;
};
export type JsonReaderOptions = JsonReaderOptions$instance;
export interface JsonReaderState$instance {
readonly Options: JsonReaderOptions;
}
export const JsonReaderState: {
new(options: JsonReaderOptions): JsonReaderState$instance;
};
export type JsonReaderState = JsonReaderState$instance;
export interface JsonWriterOptions$instance {
Encoder: JavaScriptEncoder;
IndentCharacter: char;
Indented: boolean;
IndentSize: int;
MaxDepth: int;
NewLine: string;
SkipValidation: boolean;
}
export const JsonWriterOptions: {
new(): JsonWriterOptions$instance;
};
export type JsonWriterOptions = JsonWriterOptions$instance;
export interface Utf8JsonReader$instance {
readonly BytesConsumed: long;
readonly CurrentDepth: int;
readonly CurrentState: JsonReaderState;
readonly HasValueSequence: boolean;
readonly IsFinalBlock: boolean;
readonly Position: SequencePosition;
readonly TokenStartIndex: long;
readonly TokenType: JsonTokenType;
readonly ValueIsEscaped: boolean;
readonly ValueSequence: ReadOnlySequence_1<CLROf<byte>>;
readonly ValueSpan: ReadOnlySpan_1<CLROf<byte>>;
CopyString(utf8Destination: Span_1<CLROf<byte>>): int;
CopyString(destination: Span_1<CLROf<char>>): int;
GetBoolean(): boolean;
GetByte(): byte;
GetBytesFromBase64(): byte[];
GetComment(): string;
GetDateTime(): DateTime;
GetDateTimeOffset(): DateTimeOffset;
GetDecimal(): decimal;
GetDouble(): double;
GetGuid(): Guid;
GetInt16(): short;
GetInt32(): int;
GetInt64(): long;
GetSByte(): sbyte;
GetSingle(): float;
GetString(): string;
GetUInt16(): ushort;
GetUInt32(): uint;
GetUInt64(): ulong;
Read(): boolean;
Skip(): void;
TryGetByte(value: { value: ref<byte> }): boolean;
TryGetBytesFromBase64(value: { value: ref<byte[]> }): boolean;
TryGetDateTime(value: { value: ref<DateTime> }): boolean;
TryGetDateTimeOffset(value: { value: ref<DateTimeOffset> }): boolean;
TryGetDecimal(value: { value: ref<decimal> }): boolean;
TryGetDouble(value: { value: ref<double> }): boolean;
TryGetGuid(value: { value: ref<Guid> }): boolean;
TryGetInt16(value: { value: ref<short> }): boolean;
TryGetInt32(value: { value: ref<int> }): boolean;
TryGetInt64(value: { value: ref<long> }): boolean;
TryGetSByte(value: { value: ref<sbyte> }): boolean;
TryGetSingle(value: { value: ref<float> }): boolean;
TryGetUInt16(value: { value: ref<ushort> }): boolean;
TryGetUInt32(value: { value: ref<uint> }): boolean;
TryGetUInt64(value: { value: ref<ulong> }): boolean;
TrySkip(): boolean;
ValueTextEquals(utf8Text: ReadOnlySpan_1<CLROf<byte>>): boolean;
ValueTextEquals(text: string): boolean;
ValueTextEquals(text: ReadOnlySpan_1<CLROf<char>>): boolean;
}
export const Utf8JsonReader: {
new(jsonData: ReadOnlySpan_1<CLROf<byte>>, isFinalBlock: boolean, state: JsonReaderState): Utf8JsonReader$instance;
new(jsonData: ReadOnlySpan_1<CLROf<byte>>, options: JsonReaderOptions): Utf8JsonReader$instance;
new(jsonData: ReadOnlySequence_1<CLROf<byte>>, isFinalBlock: boolean, state: JsonReaderState): Utf8JsonReader$instance;
new(jsonData: ReadOnlySequence_1<CLROf<byte>>, options: JsonReaderOptions): Utf8JsonReader$instance;
};
export type Utf8JsonReader = Utf8JsonReader$instance;
export interface JsonDocument$instance {
readonly RootElement: JsonElement;
Dispose(): void;
WriteTo(writer: Utf8JsonWriter): void;
}
export const JsonDocument: {
new(): JsonDocument$instance;
Parse(utf8Json: ReadOnlySequence_1<CLROf<byte>>, options?: JsonDocumentOptions): JsonDocument;
Parse(utf8Json: Stream, options?: JsonDocumentOptions): JsonDocument;
Parse(utf8Json: ReadOnlyMemory_1<CLROf<byte>>, options?: JsonDocumentOptions): JsonDocument;
Parse(json: ReadOnlyMemory_1<CLROf<char>>, options?: JsonDocumentOptions): JsonDocument;
Parse(json: string, options?: JsonDocumentOptions): JsonDocument;
ParseAsync(utf8Json: Stream, options?: JsonDocumentOptions, cancellationToken?: CancellationToken): Task_1<JsonDocument>;
ParseValue(reader: { value: ref<Utf8JsonReader> }): JsonDocument;
TryParseValue(reader: { value: ref<Utf8JsonReader> }, document: { value: ref<JsonDocument> }): boolean;
};
export interface __JsonDocument$views {
As_IDisposable(): System_Internal.IDisposable$instance;
}
export interface JsonDocument$instance extends System_Internal.IDisposable$instance {}
export type JsonDocument = JsonDocument$instance & __JsonDocument$views;
export interface JsonException$instance extends Exception {
readonly BytePositionInLine: Nullable_1<CLROf<long>>;
readonly LineNumber: Nullable_1<CLROf<long>>;
readonly Message: string;
readonly Path: string;
GetObjectData(info: SerializationInfo, context: StreamingContext): void;
}
export const JsonException: {
new(message: string, path: string, lineNumber: Nullable_1<CLROf<long>>, bytePositionInLine: Nullable_1<CLROf<long>>, innerException: Exception): JsonException$instance;
new(message: string, path: string, lineNumber: Nullable_1<CLROf<long>>, bytePositionInLine: Nullable_1<CLROf<long>>): JsonException$instance;
new(message: string, innerException: Exception): JsonException$instance;
new(message: string): JsonException$instance;
new(): JsonException$instance;
};
export interface __JsonException$views {
As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance;
}
export type JsonException = JsonException$instance & __JsonException$views;
export interface JsonNamingPolicy$instance {
ConvertName(name: string): string;
}
export const JsonNamingPolicy: {
readonly CamelCase: JsonNamingPolicy;
readonly SnakeCaseLower: JsonNamingPolicy;
readonly SnakeCaseUpper: JsonNamingPolicy;
readonly KebabCaseLower: JsonNamingPolicy;
readonly KebabCaseUpper: JsonNamingPolicy;
};
export type JsonNamingPolicy = JsonNamingPolicy$instance;
export interface JsonSerializerOptions$instance {
AllowDuplicateProperties: boolean;
AllowOutOfOrderMetadataProperties: boolean;
AllowTrailingCommas: boolean;
readonly Converters: IList_1<JsonConverter>;
DefaultBufferSize: int;
DefaultIgnoreCondition: JsonIgnoreCondition;
DictionaryKeyPolicy: JsonNamingPolicy;
Encoder: JavaScriptEncoder;
IgnoreNullValues: boolean;
IgnoreReadOnlyFields: boolean;
IgnoreReadOnlyProperties: boolean;
IncludeFields: boolean;
IndentCharacter: char;
IndentSize: int;
readonly IsReadOnly: boolean;
MaxDepth: int;
NewLine: string;
NumberHandling: JsonNumberHandling;
PreferredObjectCreationHandling: JsonObjectCreationHandling;
PropertyNameCaseInsensitive: boolean;
PropertyNamingPolicy: JsonNamingPolicy;
ReadCommentHandling: JsonCommentHandling;
ReferenceHandler: ReferenceHandler;
RespectNullableAnnotations: boolean;
RespectRequiredConstructorParameters: boolean;
TypeInfoResolver: IJsonTypeInfoResolver;
readonly TypeInfoResolverChain: IList_1<IJsonTypeInfoResolver>;
UnknownTypeHandling: JsonUnknownTypeHandling;
UnmappedMemberHandling: JsonUnmappedMemberHandling;
WriteIndented: boolean;
AddContext<TContext extends JsonSerializerContext>(): void;
GetConverter(typeToConvert: Type): JsonConverter;
GetTypeInfo(type_: Type): JsonTypeInfo;
MakeReadOnly(): void;
MakeReadOnly(populateMissingResolver: boolean): void;
TryGetTypeInfo(type_: Type, typeInfo: { value: ref<JsonTypeInfo> }): boolean;
}
export const JsonSerializerOptions: {
new(): JsonSerializerOptions$instance;
new(options: JsonSerializerOptions): JsonSerializerOptions$instance;
new(defaults: JsonSerializerDefaults): JsonSerializerOptions$instance;
readonly Default: JsonSerializerOptions;
readonly Web: JsonSerializerOptions;
readonly Strict: JsonSerializerOptions;
};
export type JsonSerializerOptions = JsonSerializerOptions$instance;
export interface Utf8JsonWriter$instance {
readonly BytesCommitted: long;
readonly BytesPending: int;
readonly CurrentDepth: int;
readonly Options: JsonWriterOptions;
Dispose(): void;
DisposeAsync(): ValueTask;
Flush(): void;
FlushAsync(cancellationToken?: CancellationToken): Task;
Reset(): void;
Reset(utf8Json: Stream): void;
Reset(bufferWriter: IBufferWriter_1<CLROf<byte>>): void;
WriteBase64String(propertyName: JsonEncodedText, bytes: ReadOnlySpan_1<CLROf<byte>>): void;
WriteBase64String(propertyName: string, bytes: ReadOnlySpan_1<CLROf<byte>>): void;
WriteBase64String(propertyName: ReadOnlySpan_1<CLROf<char>>, bytes: ReadOnlySpan_1<CLROf<byte>>): void;
WriteBase64String(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, bytes: ReadOnlySpan_1<CLROf<byte>>): void;
WriteBase64StringSegment(value: ReadOnlySpan_1<CLROf<byte>>, isFinalSegment: boolean): void;
WriteBase64StringValue(bytes: ReadOnlySpan_1<CLROf<byte>>): void;
WriteBoolean(propertyName: JsonEncodedText, value: boolean): void;
WriteBoolean(propertyName: string, value: boolean): void;
WriteBoolean(propertyName: ReadOnlySpan_1<CLROf<char>>, value: boolean): void;
WriteBoolean(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: boolean): void;
WriteBooleanValue(value: boolean): void;
WriteCommentValue(value: string): void;
WriteCommentValue(value: ReadOnlySpan_1<CLROf<char>>): void;
WriteCommentValue(utf8Value: ReadOnlySpan_1<CLROf<byte>>): void;
WriteEndArray(): void;
WriteEndObject(): void;
WriteNull(propertyName: JsonEncodedText): void;
WriteNull(propertyName: string): void;
WriteNull(propertyName: ReadOnlySpan_1<CLROf<char>>): void;
WriteNull(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>): void;
WriteNullValue(): void;
WriteNumber(propertyName: JsonEncodedText, value: decimal): void;
WriteNumber(propertyName: string, value: decimal): void;
WriteNumber(propertyName: ReadOnlySpan_1<CLROf<char>>, value: decimal): void;
WriteNumber(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: decimal): void;
WriteNumber(propertyName: JsonEncodedText, value: double): void;
WriteNumber(propertyName: string, value: double): void;
WriteNumber(propertyName: ReadOnlySpan_1<CLROf<char>>, value: double): void;
WriteNumber(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: double): void;
WriteNumber(propertyName: JsonEncodedText, value: float): void;
WriteNumber(propertyName: string, value: float): void;
WriteNumber(propertyName: ReadOnlySpan_1<CLROf<char>>, value: float): void;
WriteNumber(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: float): void;
WriteNumber(propertyName: JsonEncodedText, value: long): void;
WriteNumber(propertyName: string, value: long): void;
WriteNumber(propertyName: ReadOnlySpan_1<CLROf<char>>, value: long): void;
WriteNumber(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: long): void;
WriteNumber(propertyName: JsonEncodedText, value: int): void;
WriteNumber(propertyName: string, value: int): void;
WriteNumber(propertyName: ReadOnlySpan_1<CLROf<char>>, value: int): void;
WriteNumber(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: int): void;
WriteNumber(propertyName: JsonEncodedText, value: ulong): void;
WriteNumber(propertyName: string, value: ulong): void;
WriteNumber(propertyName: ReadOnlySpan_1<CLROf<char>>, value: ulong): void;
WriteNumber(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: ulong): void;
WriteNumber(propertyName: JsonEncodedText, value: uint): void;
WriteNumber(propertyName: string, value: uint): void;
WriteNumber(propertyName: ReadOnlySpan_1<CLROf<char>>, value: uint): void;
WriteNumber(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: uint): void;
WriteNumberValue(value: decimal): void;
WriteNumberValue(value: double): void;
WriteNumberValue(value: float): void;
WriteNumberValue(value: int): void;
WriteNumberValue(value: long): void;
WriteNumberValue(value: uint): void;
WriteNumberValue(value: ulong): void;
WritePropertyName(propertyName: JsonEncodedText): void;
WritePropertyName(propertyName: string): void;
WritePropertyName(propertyName: ReadOnlySpan_1<CLROf<char>>): void;
WritePropertyName(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>): void;
WriteRawValue(json: string, skipInputValidation?: boolean): void;
WriteRawValue(json: ReadOnlySpan_1<CLROf<char>>, skipInputValidation?: boolean): void;
WriteRawValue(utf8Json: ReadOnlySpan_1<CLROf<byte>>, skipInputValidation?: boolean): void;
WriteRawValue(utf8Json: ReadOnlySequence_1<CLROf<byte>>, skipInputValidation?: boolean): void;
WriteStartArray(): void;
WriteStartArray(propertyName: JsonEncodedText): void;
WriteStartArray(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>): void;
WriteStartArray(propertyName: string): void;
WriteStartArray(propertyName: ReadOnlySpan_1<CLROf<char>>): void;
WriteStartObject(): void;
WriteStartObject(propertyName: JsonEncodedText): void;
WriteStartObject(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>): void;
WriteStartObject(propertyName: string): void;
WriteStartObject(propertyName: ReadOnlySpan_1<CLROf<char>>): void;
WriteString(propertyName: JsonEncodedText, value: DateTime): void;
WriteString(propertyName: string, value: DateTime): void;
WriteString(propertyName: ReadOnlySpan_1<CLROf<char>>, value: DateTime): void;
WriteString(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: DateTime): void;
WriteString(propertyName: JsonEncodedText, value: DateTimeOffset): void;
WriteString(propertyName: string, value: DateTimeOffset): void;
WriteString(propertyName: ReadOnlySpan_1<CLROf<char>>, value: DateTimeOffset): void;
WriteString(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: DateTimeOffset): void;
WriteString(propertyName: JsonEncodedText, value: Guid): void;
WriteString(propertyName: string, value: Guid): void;
WriteString(propertyName: ReadOnlySpan_1<CLROf<char>>, value: Guid): void;
WriteString(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: Guid): void;
WriteString(propertyName: JsonEncodedText, value: JsonEncodedText): void;
WriteString(propertyName: string, value: JsonEncodedText): void;
WriteString(propertyName: string, value: string): void;
WriteString(propertyName: ReadOnlySpan_1<CLROf<char>>, value: ReadOnlySpan_1<CLROf<char>>): void;
WriteString(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, utf8Value: ReadOnlySpan_1<CLROf<byte>>): void;
WriteString(propertyName: JsonEncodedText, value: string): void;
WriteString(propertyName: JsonEncodedText, value: ReadOnlySpan_1<CLROf<char>>): void;
WriteString(propertyName: string, value: ReadOnlySpan_1<CLROf<char>>): void;
WriteString(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: ReadOnlySpan_1<CLROf<char>>): void;
WriteString(propertyName: JsonEncodedText, utf8Value: ReadOnlySpan_1<CLROf<byte>>): void;
WriteString(propertyName: string, utf8Value: ReadOnlySpan_1<CLROf<byte>>): void;
WriteString(propertyName: ReadOnlySpan_1<CLROf<char>>, utf8Value: ReadOnlySpan_1<CLROf<byte>>): void;
WriteString(propertyName: ReadOnlySpan_1<CLROf<char>>, value: JsonEncodedText): void;
WriteString(propertyName: ReadOnlySpan_1<CLROf<char>>, value: string): void;
WriteString(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: JsonEncodedText): void;
WriteString(utf8PropertyName: ReadOnlySpan_1<CLROf<byte>>, value: string): void;
WriteStringValue(value: DateTime): void;
WriteStringValue(value: DateTimeOffset): void;
WriteStringValue(value: Guid): void;
WriteStringValue(value: JsonEncodedText): void;
WriteStringValue(value: string): void;
WriteStringValue(value: ReadOnlySpan_1<CLROf<char>>): void;
WriteStringValue(utf8Value: ReadOnlySpan_1<CLROf<byte>>): void;
WriteStringValueSegment(value: ReadOnlySpan_1<CLROf<char>>, isFinalSegment: boolean): void;
WriteStringValueSegment(value: ReadOnlySpan_1<CLROf<byte>>, isFinalSegment: boolean): void;
}
export const Utf8JsonWriter: {
new(bufferWriter: IBufferWriter_1<CLROf<byte>>, options: JsonWriterOptions): Utf8JsonWriter$instance;
new(utf8Json: Stream, options: JsonWriterOptions): Utf8JsonWriter$instance;
};
export interface __Utf8JsonWriter$views {
As_IAsyncDisposable(): System_Internal.IAsyncDisposable$instance;
As_IDisposable(): System_Internal.IDisposable$instance;
}
export interface Utf8JsonWriter$instance extends System_Internal.IAsyncDisposable$instance, System_Internal.IDisposable$instance {}
export type Utf8JsonWriter = Utf8JsonWriter$instance & __Utf8JsonWriter$views;
export abstract class JsonSerializer$instance {
static readonly IsReflectionEnabledByDefault: boolean;
static Deserialize<TValue>(utf8Json: Stream, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(utf8Json: Stream, options?: JsonSerializerOptions): TValue;
static Deserialize(utf8Json: Stream, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(utf8Json: Stream, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(utf8Json: Stream, returnType: Type, context: JsonSerializerContext): unknown;
static Deserialize<TValue>(utf8Json: ReadOnlySpan_1<CLROf<byte>>, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(utf8Json: ReadOnlySpan_1<CLROf<byte>>, options?: JsonSerializerOptions): TValue;
static Deserialize(utf8Json: ReadOnlySpan_1<CLROf<byte>>, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(utf8Json: ReadOnlySpan_1<CLROf<byte>>, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(utf8Json: ReadOnlySpan_1<CLROf<byte>>, returnType: Type, context: JsonSerializerContext): unknown;
static Deserialize<TValue>(json: ReadOnlySpan_1<CLROf<char>>, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(json: ReadOnlySpan_1<CLROf<char>>, options?: JsonSerializerOptions): TValue;
static Deserialize(json: ReadOnlySpan_1<CLROf<char>>, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(json: ReadOnlySpan_1<CLROf<char>>, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(json: ReadOnlySpan_1<CLROf<char>>, returnType: Type, context: JsonSerializerContext): unknown;
static Deserialize<TValue>(json: string, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(json: string, options?: JsonSerializerOptions): TValue;
static Deserialize(json: string, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(json: string, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(json: string, returnType: Type, context: JsonSerializerContext): unknown;
static Deserialize<TValue>(document: JsonDocument, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(document: JsonDocument, options?: JsonSerializerOptions): TValue;
static Deserialize(document: JsonDocument, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(document: JsonDocument, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(document: JsonDocument, returnType: Type, context: JsonSerializerContext): unknown;
static Deserialize<TValue>(element: JsonElement, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(element: JsonElement, options?: JsonSerializerOptions): TValue;
static Deserialize(element: JsonElement, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(element: JsonElement, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(element: JsonElement, returnType: Type, context: JsonSerializerContext): unknown;
static Deserialize<TValue>(node: JsonNode, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(node: JsonNode, options?: JsonSerializerOptions): TValue;
static Deserialize(node: JsonNode, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(node: JsonNode, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(node: JsonNode, returnType: Type, context: JsonSerializerContext): unknown;
static Deserialize<TValue>(reader: { value: ref<Utf8JsonReader> }, jsonTypeInfo: JsonTypeInfo_1<TValue>): TValue;
static Deserialize<TValue>(reader: { value: ref<Utf8JsonReader> }, options?: JsonSerializerOptions): TValue;
static Deserialize(reader: { value: ref<Utf8JsonReader> }, jsonTypeInfo: JsonTypeInfo): unknown;
static Deserialize(reader: { value: ref<Utf8JsonReader> }, returnType: Type, options?: JsonSerializerOptions): unknown;
static Deserialize(reader: { value: ref<Utf8JsonReader> }, returnType: Type, context: JsonSerializerContext): unknown;
static DeserializeAsync<TValue>(utf8Json: PipeReader, jsonTypeInfo: JsonTypeInfo_1<TValue>, cancellationToken?: CancellationToken): ValueTask_1<TValue>;
static DeserializeAsync<TValue>(utf8Json: PipeReader, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): ValueTask_1<TValue>;
static DeserializeAsync(utf8Json: PipeReader, jsonTypeInfo: JsonTypeInfo, cancellationToken?: CancellationToken): ValueTask_1<unknown>;
static DeserializeAsync(utf8Json: PipeReader, returnType: Type, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): ValueTask_1<unknown>;
static DeserializeAsync(utf8Json: PipeReader, returnType: Type, context: JsonSerializerContext, cancellationToken?: CancellationToken): ValueTask_1<unknown>;
static DeserializeAsync<TValue>(utf8Json: Stream, jsonTypeInfo: JsonTypeInfo_1<TValue>, cancellationToken?: CancellationToken): ValueTask_1<TValue>;
static DeserializeAsync<TValue>(utf8Json: Stream, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): ValueTask_1<TValue>;
static DeserializeAsync(utf8Json: Stream, jsonTypeInfo: JsonTypeInfo, cancellationToken?: CancellationToken): ValueTask_1<unknown>;
static DeserializeAsync(utf8Json: Stream, returnType: Type, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): ValueTask_1<unknown>;
static DeserializeAsync(utf8Json: Stream, returnType: Type, context: JsonSerializerContext, cancellationToken?: CancellationToken): ValueTask_1<unknown>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: PipeReader, jsonTypeInfo: JsonTypeInfo_1<TValue>, topLevelValues: boolean, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: PipeReader, jsonTypeInfo: JsonTypeInfo_1<TValue>, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: PipeReader, topLevelValues: boolean, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: PipeReader, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: Stream, jsonTypeInfo: JsonTypeInfo_1<TValue>, topLevelValues: boolean, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: Stream, jsonTypeInfo: JsonTypeInfo_1<TValue>, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: Stream, topLevelValues: boolean, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static DeserializeAsyncEnumerable<TValue>(utf8Json: Stream, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): IAsyncEnumerable_1<TValue>;
static Serialize(utf8Json: Stream, value: unknown, jsonTypeInfo: JsonTypeInfo): void;
static Serialize(utf8Json: Stream, value: unknown, inputType: Type, options?: JsonSerializerOptions): void;
static Serialize(utf8Json: Stream, value: unknown, inputType: Type, context: JsonSerializerContext): void;
static Serialize<TValue>(utf8Json: Stream, value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>): void;
static Serialize<TValue>(utf8Json: Stream, value: TValue, options?: JsonSerializerOptions): void;
static Serialize(value: unknown, jsonTypeInfo: JsonTypeInfo): string;
static Serialize(value: unknown, inputType: Type, options?: JsonSerializerOptions): string;
static Serialize(value: unknown, inputType: Type, context: JsonSerializerContext): string;
static Serialize(writer: Utf8JsonWriter, value: unknown, jsonTypeInfo: JsonTypeInfo): void;
static Serialize(writer: Utf8JsonWriter, value: unknown, inputType: Type, options?: JsonSerializerOptions): void;
static Serialize(writer: Utf8JsonWriter, value: unknown, inputType: Type, context: JsonSerializerContext): void;
static Serialize<TValue>(writer: Utf8JsonWriter, value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>): void;
static Serialize<TValue>(writer: Utf8JsonWriter, value: TValue, options?: JsonSerializerOptions): void;
static Serialize<TValue>(value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>): string;
static Serialize<TValue>(value: TValue, options?: JsonSerializerOptions): string;
static SerializeAsync(utf8Json: PipeWriter, value: unknown, jsonTypeInfo: JsonTypeInfo, cancellationToken?: CancellationToken): Task;
static SerializeAsync(utf8Json: PipeWriter, value: unknown, inputType: Type, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): Task;
static SerializeAsync(utf8Json: PipeWriter, value: unknown, inputType: Type, context: JsonSerializerContext, cancellationToken?: CancellationToken): Task;
static SerializeAsync<TValue>(utf8Json: PipeWriter, value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>, cancellationToken?: CancellationToken): Task;
static SerializeAsync<TValue>(utf8Json: PipeWriter, value: TValue, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): Task;
static SerializeAsync(utf8Json: Stream, value: unknown, jsonTypeInfo: JsonTypeInfo, cancellationToken?: CancellationToken): Task;
static SerializeAsync(utf8Json: Stream, value: unknown, inputType: Type, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): Task;
static SerializeAsync(utf8Json: Stream, value: unknown, inputType: Type, context: JsonSerializerContext, cancellationToken?: CancellationToken): Task;
static SerializeAsync<TValue>(utf8Json: Stream, value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>, cancellationToken?: CancellationToken): Task;
static SerializeAsync<TValue>(utf8Json: Stream, value: TValue, options?: JsonSerializerOptions, cancellationToken?: CancellationToken): Task;
static SerializeToDocument(value: unknown, jsonTypeInfo: JsonTypeInfo): JsonDocument;
static SerializeToDocument(value: unknown, inputType: Type, options?: JsonSerializerOptions): JsonDocument;
static SerializeToDocument(value: unknown, inputType: Type, context: JsonSerializerContext): JsonDocument;
static SerializeToDocument<TValue>(value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>): JsonDocument;
static SerializeToDocument<TValue>(value: TValue, options?: JsonSerializerOptions): JsonDocument;
static SerializeToElement(value: unknown, jsonTypeInfo: JsonTypeInfo): JsonElement;
static SerializeToElement(value: unknown, inputType: Type, options?: JsonSerializerOptions): JsonElement;
static SerializeToElement(value: unknown, inputType: Type, context: JsonSerializerContext): JsonElement;
static SerializeToElement<TValue>(value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>): JsonElement;
static SerializeToElement<TValue>(value: TValue, options?: JsonSerializerOptions): JsonElement;
static SerializeToNode(value: unknown, jsonTypeInfo: JsonTypeInfo): JsonNode;
static SerializeToNode(value: unknown, inputType: Type, options?: JsonSerializerOptions): JsonNode;
static SerializeToNode(value: unknown, inputType: Type, context: JsonSerializerContext): JsonNode;
static SerializeToNode<TValue>(value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>): JsonNode;
static SerializeToNode<TValue>(value: TValue, options?: JsonSerializerOptions): JsonNode;
static SerializeToUtf8Bytes(value: unknown, jsonTypeInfo: JsonTypeInfo): byte[];
static SerializeToUtf8Bytes(value: unknown, inputType: Type, options?: JsonSerializerOptions): byte[];
static SerializeToUtf8Bytes(value: unknown, inputType: Type, context: JsonSerializerContext): byte[];
static SerializeToUtf8Bytes<TValue>(value: TValue, jsonTypeInfo: JsonTypeInfo_1<TValue>): byte[];
static SerializeToUtf8Bytes<TValue>(value: TValue, options?: JsonSerializerOptions): byte[];
}
export type JsonSerializer = JsonSerializer$instance;