Skip to content

Backporting BJData features to UBJSON - ND array, u/m/M/h markers and handling of NaN #109

@fangq

Description

@fangq

@Steve132, Re your comments at Steve132/ubj#8 and #108

I think the right step forward for the project would be to agree on an
array spec, agree on other changes, and move forward to a 1.0 spec, along
with reference implementations in as many languages as possible and a test
suite.

Again, I am happy to assist on backporting the new syntax to UBJSON so we do not have to maintain two separate specs.

The main additions made in BJData Draft 1 include

  1. an optimized ND array container (via # followed by a 1D array object)

https://github.com/OpenJData/bjdata/blob/Draft_1/Binary_JData_Specification.md#optimized-n-dimensional-array-of-uniform-type

  1. new dedicated markers for unsigned integers and half-precision floating-point numbers
    NeuroJSON/bjdata@95544dc

  2. Instead of converting NaN/+-infinity to null, BJData keeps their respective IEEE 754 binary forms
    NeuroJSON/bjdata@f3d338f#diff-d94a316d99f805938f1320db036a84a5L174

I will explain the rationales for each of my additions, and we can discuss/approve/disapprove in this thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions