Skip to content

simdjson_key_count should properly return sizes larger than 0xFFFFFF(16777215) #74

@TysonAndre

Description

@TysonAndre

If the value of size() is 0xFFFFFF then iterate over the object/array instead to count the keys

Add test cases.

// class simdjson::dom::array 
  /**
   * Get the size of the array (number of immediate children).
   * It is a saturated value with a maximum of 0xFFFFFF: if the value
   * is 0xFFFFFF then the size is 0xFFFFFF or greater.
   */
  inline size_t size() const noexcept;

// class simdjson::dom::object
  /**
   * Get the size of the object (number of keys).
   * It is a saturated value with a maximum of 0xFFFFFF: if the value
   * is 0xFFFFFF then the size is 0xFFFFFF or greater.
   */
  inline size_t size() const noexcept;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions