LitJSON / litjson

JSON library for the .Net framework
https://litjson.net/
Other
1.37k stars 404 forks source link

LitJSON null type and empty array bugs #18

Closed AndreyPostelzhuk closed 10 years ago

AndreyPostelzhuk commented 10 years ago

I use LitJson with Unity3d. There are two bugs I have found:

string jsonStr = "{'body':null}";
LitJson.JsonData jsonData = LitJson.JsonMapper.ToObject(jsonStr);
jsonStr = LitJson.JsonMapper.ToJson(jsonData); //exception here
string jsonStr = "[[],[],[]]";
LitJson.JsonData jsonData = LitJson.JsonMapper.ToObject(jsonStr);
jsonStr = LitJson.JsonMapper.ToJson(jsonData);
Debug.Log(jsonStr); // []
jeffcrouse commented 10 years ago

+1

shinriyo commented 10 years ago

+2

taka-oyama commented 10 years ago

+3

cmisztur commented 10 years ago

+4

lbv commented 10 years ago

Thanks for the report, and sorry for the long silence.

I think the point has been made, and we all want to see this fixed. Please, no more "+" comments :).

lbv commented 10 years ago

Mmm, now that I'm checking, the null-type thing seems to be the same as Issue #12, and the array thing works for me. It currently prints: [[],[],[]].

Please let me know if I'm missing something.