I know how to JSON encode and decode an object. That's no biggie. However, I've reached a situation where I need to save $this as a JSON string, and then later, populate $this's attributes from that JSON string.
In other words, I don't want to get a new instance of an object with the data from the JSON string, I want to apply it to an existing object.
How can I do that?
$thisbut not defined on your encoded object, what do you want to happen with that attribute when you apply the encoded data to$this?$thisto its old value. My object always has its attributes fully populated.$instance->jsonecodestuf->etc