Decoding JSON lists using Mochijson produces erroneous results depending on the list values.
For example:
Eshell V5.9.1 (abort with ^G)
1> c(mochijson).
{ok,mochijson}
2> mochijson:decode("[]").
{array,[]}
3> mochijson:decode("[100]").
{array,"d"}
4> mochijson:decode("[100,100]").
{array,"dd"}
5> mochijson:decode("[20,20]").
{array,[20,20]}
6> mochijson:decode("[30,30]").
{array,[30,30]}
7> mochijson:decode("[35,35]").
{array,"##"}
8> mochijson:decode("[\"Hello\",35]").
{array,["Hello",35]}
My problem is that lines 3,4 and 7 are converting the list items into their ascii equivalents not decoding them as integers.
Any pointers either to an different JSON library or workaround/fix appreciated. :-)