Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature.Id only supports String type #187

Copy link
Copy link
@dmitry-kandiner

Description

@dmitry-kandiner
Issue body actions

Hello!

According to https://datatracker.ietf.org/doc/html/rfc7946#section-3.2, the Id field of the Feature, if present, can be either number or string:

If a Feature has a commonly used identifier, that identifier
SHOULD be included as a member of the Feature object with the name
"id", and the value of this member is either a JSON string or
number.

However, current implementation only supports deserialization of string values for this field.
Proposed solutions:

  • A custom JSON converter for this field, with storing the value as a string.
  • Storing the value as a discriminated union of string and int (or long).

Best regards,
Dmitry

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.