Sitelet https://github.com/ubjson/universal-binary-json/issues/85
Skip to content

Clarify "count" vs. "length" for containers #85

Description

@ColinH

On the "Container Types" page, the "length" is listed as being "optional" for containers. However containers never seem to use the generic length format given in the "Data Format" section of the "Specification" page. Instead, they use the "count" field from the "Optimized Format".

If this understanding is correct I would suggest listing "length" as "no" for containers, and possibly adding another column to the tables (showing the encoding) named "count", which would be "no" for all types except containers, where it would be "optional".

Alternatively, "count" for containers could be renamed to "length", and the generic length format description be changed to accommodate both encodings, and both semantics (sub-value count vs. value bytes).

PS: While obviously implied, it seems to never be clearly stated that the "length" for a "string" is intended to be the length of the string value in bytes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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