Serialization
It's possible to obtain a serialized object of a Structure using the method toJSON()
. This method is also compliant with the JSON.stringify()
specification, so you can use it to serialize your object too.
Important:
Be aware that
toJSON()
will return an object, not the JSON in form of a string likeJSON.stringify()
doesRefer to the Date#toJSON specification to see how dates will be serialized by
JSON.stringify
Refer to Dealing with nullable attributes to check how
nullables
are going to be returned on Serialization
Last updated