Skip to content

NaN, Infinity, and -Infinity for numbers #603

@ralfhandl

Description

@ralfhandl

Somehow the authors of the JSON specification forgot the special number values NaN, Infinity, and -Infinity. As a workaround we represent these double values as JSON string values, and declare the corresponding properties as
"type": ["number","string"],
"format":"double"

Is there a best practice to deal with this, and could that become part of the OpenAPI specification or an accompanying document?

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