Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Representation of Infinity and NaN in DAG-JSON #342

@patrsc

Description

@patrsc

DAG-JSON is supposed to support the full IPLD data model. Does this mean that the IEEE 754 special values Infinity, -Infinity, and NaN should also be supported? Currently these values are mapped to null in the JS implementation of DAG-JSON. It is possible to represent these values in DAG-CBOR (also the JS implementation supports it). A possible way to encode them could be the following:

{"/": {"float": "Infinity"}}
{"/": {"float": "-Infinity"}}
{"/": {"float": "NaN"}}

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