-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Use reference or pointer as Object value #841
Comments
No, this is currently not possible. The only thing that could avoid copies is to move the data to the JSON value. |
@nlohmann just for fun. Would it be hard to change the behavior? I guess so... |
I use this method to avoid copying
|
Of course, you can use references to JSON values where possible - you just can't store them in a JSON value itself. |
Can I close this issue? |
Yes, I found some ways around it. SharedPtr and Value References. Thanks. |
+1 For supporting references to allow: This could be with the use of a new syntax of some manner: `json::by_ref(datas) |
Hi there,
I have a small question. Is it possible to set the value of an object element to a reference or point without copying it?
What I like to achieve is the following
Thanks for your help. :)
The text was updated successfully, but these errors were encountered: