Skip to content

operator[] returns by value #9

@feazeyu

Description

@feazeyu

In my opinion, this behavior is very counterintuitive and the operator[] should return a reference instead, or it should be explicitly stated that jValue objects are intended as readonly.

As of now, the methods to modify jValue objects are public, thus semantically telling us that we should be able to modify them, however once you try to modify any values, you run into the issue of not being able to get a pointer to it.

Please fix the semantics or make the return be a reference instead of a value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions