I’m using Parse Server as a back end (the open source version). I have native Android application that saves an object to the server’s DB. The object is really simple one, just a key-value pair. When Android application creates an object, it creates it as JSON object.
Now I want to retrieve the same object from an Ionic 2 app. In Ionic app I use JS Parse API to access back end. When an object is created in JS API it’s created as plain text object.
As a result I’m getting: 101 Object not found
It seems like what I need to do is to translate Parse plan text object in my Ionic app to Parse JSON object.
This is what I tried to do:
According to the JS Parse documentation one of the methods of Parse.Object is toJSON(). I tried to apply this method in different combinations to the Parse object before creating query, but I always get an error: this.parse.Object.extend(…).toJSON is not a function
I tried to apply standard JSON Api (i.e. JSON.stringify) to the Parse object. In this case I’m getting an error: ParseQuery must be constructed with a ParseObject or class name.
I did very extensive search on internet and found nothing helpful.
Would appreciate any ideas on the matter.