Skip to content

Extend Utf8JsonReader.CopyString to also accept JsonTokenType.Number values #84375

Open
@eiriktsarpalis

Description

@eiriktsarpalis

The current implementation of the Utf8JsonReader.CopyString methods only accepts JSON string tokens, that is JsonTokenType.PropertyName and JsonTokenType.String. When implementing JsonConverters for large numeric types such as BigInteger (#60780) or Int128/UInt128 (#73500) extending the method to also handle JSON number tokens would greatly simplify getting allocation-free views of underlying JSON number encodings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Text.JsonenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions