JSON encode/decode discrepancies on some inputs #76

Closed
mitchellh opened this Issue May 1, 2012 · 1 comment

Comments

Projects
None yet
1 participant

Here is some interesting behavior:

> mochijson2:decode(<<"[15]">>).                                     
[15]
> mochijson2:decode(<<"[10]">>).
"\n"
> list_to_binary(mochijson2:encode([10])). 
<<"[10]">>
> mochijson2:decode(list_to_binary(mochijson2:encode([10]))).
"\n"

So if you encode [10] then code it you don't get [10] back out.

Any ideas?

Oh obviously "10" matches to "\n"

Derp.

mitchellh closed this May 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment