Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

objects aren't deep converted #21

Merged
merged 6 commits into from Aug 2, 2012
Merged

objects aren't deep converted #21

merged 6 commits into from Aug 2, 2012

Conversation

ericcj
Copy link
Contributor

@ericcj ericcj commented Aug 2, 2012

if i query for a PFObject that has an array in it the array comes back as a ruby Array, but if the objects inside it are not scalars they are not converted, they just show up as Hashes which I then have to call Parse.parse_json('blah', hash) on. looking at the code, maybe obj is_a? Array doesn't succeed on the top level one cause it hasn't been parsed yet?

@adelevie
Copy link
Owner

Could you please post some more lines with sample code so I can better
understand this?

On Monday, June 25, 2012, Eric Jensen wrote:

if i query for a PFObject that has an array in it the array comes back as
a ruby Array, but if the objects inside it are not scalars they are not
converted, they just show up as Hashes which I then have to call
Parse.parse_json('blah', hash) on. looking at the code, maybe obj is_a?
Array doesn't succeed on the top level one cause it hasn't been parsed yet?


Reply to this email directly or view it on GitHub:
#21

@ericcj
Copy link
Contributor Author

ericcj commented Jul 3, 2012

don't have any code handy, but in general if an array contains dates from Parse they'd show up as an Array of Hashes instead of deep converting into an array of ruby Parse::Dates

@ericcj
Copy link
Contributor Author

ericcj commented Aug 2, 2012

This pull adds a test and fixes the problem (among others), but I would recommend bumping the version to 0.13 (skipping 0.12 for other contributors' convenience) since this changes a lot about how objects come back (i was calling Parse.parse_datatype all over the place in my usage, for example, and had to remove that)

adelevie added a commit that referenced this pull request Aug 2, 2012
objects aren't deep converted
@adelevie adelevie merged commit 6063c89 into adelevie:master Aug 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants