Parse.Object deep serialization including Pointers, Relations, ACLs

Whelp, the title pretty much sums up the question

  • is there a method to ‘deep serialize’ a ParseObject, including all related objects - pointers, relations, ACLs and any other related Parse objects.?

  • and if not, what would be the right approach? Serialize the starting object, and iterate recursively looking for a toJSON() method perhaps?

I’m sure this has been asked or done before but I can’t find anything in this forum or in the docs.

Update: i guess what I’m looking for is a method to create the data POJO as seen when you print the contents of attributes to the screen.


I might be understanding your questions incorrectly, but are just trying to fetch all nested Parse Objects? If so, you can use includeAll in JS:

If you find, first, or even fetch with includeAll and then printed your object to the console it should show all nested items.

You should be able to use new Parse.Object.fromJSON, but your pointers and relations will have to have types, such as:

const json = {
  className: 'MyObject',
   file: {
     __type: 'File',
     name: 'parse.txt',
     url: '',
const obj = new Parse.Object.fromJSON(json);

No, in order tackle the data reactivity we spoke about on the other thread, I want to create a recursive non-native representation of the object where pointers, relations, ACLs etc have been substituted for their POJO-like representations (ie. non-frozen attributes) so I can access the aggregate data like so: member.membership.term - three related nested objects … which in parse would be more like member.get('membership').get('term') - again, it’s all about trying to keep the usefulness of parse (ie relations, querying etc) and do it as natively as possible … whilst adding data reactivity in Vue.