Skip to content

Use reference or pointer as Object value #841

Description

@go2sh

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

json data, result, response;
bool hasError = calcResult(data, result);
if (hasError) {
response["error"] = result; // no copy
} else {
response["result"] = result; // nocopy
}

Thanks for your help. :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions