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

Error - index_for_non_list #17

Open
Kozlov-V opened this issue Jun 17, 2014 · 2 comments
Open

Error - index_for_non_list #17

Kozlov-V opened this issue Jun 17, 2014 · 2 comments

Comments

@Kozlov-V
Copy link

Sametime i has response with JSON suchlike:

{"results":null}

and i have a problem when try ej:get({"results", 1, "Subject"}, DecodeJSON).
How fix this error:

 {{index_for_non_list,{1,null}},
[{ej,get_value,2,[{file,"src/ej.erl"},{line,151}]},
{ej,get0,2,[{file,"src/ej.erl"},{line,107}]},

Thank you!

@seth
Copy link
Owner

seth commented Jun 22, 2014

Interesting. I guess we should fix this and have it behave similarly to other deep path requests that don't exist and return undefined.

Seems related to #13

Until there's a fix, you'll need to test that you have a non-null I'm afraid.

@Kozlov-V
Copy link
Author

Thank you!
I fix it with test non-null

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

No branches or pull requests

2 participants