Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator[] returns by value #9

Open
feazeyu opened this issue Feb 22, 2025 · 0 comments
Open

operator[] returns by value #9

feazeyu opened this issue Feb 22, 2025 · 0 comments

Comments

@feazeyu
Copy link

feazeyu commented Feb 22, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant