Closed
Description
Hello I think the _encode() for ParseObject is not implemented correctly.
_encode() should not json_encode at all (Like the ParseGeoPoint encode method). If nested arrays are encoded (due to recursion) then encoding the top level array will cause a heap of issues when parsing the final JSON using existing JSON parsers.
The encode should really be a toArray() method, where the result can be passed to a json_encode().
Line 790 and 795 should check if $value and $item are either a instanceof ParseObject or ParseGeoPoint. Since ParseGeoPoint is not being checked, then it will never be encoded.
I have made changes to my application as necessary, but would like to hear discussion. Hope this is clear.
Metadata
Metadata
Assignees
Labels
No labels