Skip to content

Allow JSON Pointer queries on arrays and objects in On Demand #1701

@lemire

Description

@lemire

The JSON Pointer specification is a document-wide format. It does not have a notion of subdocument. There is not such thing as a relative query.

Between each JSON Pointer query, on the On Demand document, we reset our string buffer (the buffer used for unescaped strings). This is needed because someone could do multiple JSON Pointer queries on the same document, possibly generating a buffer overflow. By resetting the string buffer, we ensure that buffer overflows are impossible.

To achieve the same results over arrays and objects, we would need to similarly reset the string buffer between JSON Pointer calls. This would invalidate all other string references, including references outside of the array/object in question.

#1696 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    on demandRelated to simdjson::ondemand functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions