_docs-v5/resource-data/Resource-toPlainObject.md
Serializes a Resource API Object to a plain object that would be fit for JSON.stringify.
<div class='spec' markdown='1'> resource.toPlainObject( *settings* ) </div>This methods attempts to aggregate all non-empty properties. Not all properties are supported. If the resulting object does not look as desired, it is best to write your own serialization function from scratch.
The optional settings argument contains properties that affect serialization:
The toPlainObject method is aliased to the toJSON method so that JSON.stringify works.