问题
I checked the docs: http://parse.com/docs/js/api/classes/Parse.Object.html#methods_fromJSON
And I did this: Parse.Object.fromJSON(this.document)
, but I get: Uncaught Error: Cannot create an object without a className
.
What's the correct way of using this method?
NOTE: console.log(this.document)
outputs: Object {}
(A Parse object that was previously turned into a JSON object with toJSON
.)
回答1:
As the error message says, you're missing a className
(in your JSON) that tells it what kind of Parse object it is.
来源:https://stackoverflow.com/questions/34905095/how-to-use-parse-object-fromjson