LitJSON Limitations/Warnings
Unity3D/Problems 2016. 5. 10. 15:33LitJSON Limitations/Warnings
The library seems pretty good, but a few major things I've noticed when serializing/deserializing a class:
- LitJSON only outputs/inputs public variables.
- Not a bad thing necessarily - you might like to use private for things you don't want output.
- LitJSON outputs (public) const values, but will (not suprisingly) fail trying to import consts.
- You may need to move these consts elsewhere or make them private.
- LitJSON crashes if you try to output (public) float!
- This is the nastiest problem. My workaround was to make any (public) reals I needed public double.
- Any public float will produce an error message like this:
JsonException: Max allowed object depth reached while trying to export from type System.Single
LitJson.JsonMapper.WriteValue (System.Object obj, LitJson.JsonWriter writer, Boolean writer_is_private, Int32 depth)
위키에서 가져온 제한 및 경고.
LitJSON - 무조건 public 변수를 사용 하여야함.
LitJSON - 상수를 가져오려하면 실패함.
LitJSON - float을 지원하지 않음! (하지만 double은 잘 됨.)
그 외
LitJSON - iOS에서 직렬화가 되지 않는다는 정보가 있음.
# http://lbv.github.io/litjson/docs/quickstart.html
# http://lbv.github.io/litjson/
'Unity3D > Problems' 카테고리의 다른 글
EditorGUILayout.ObjectField obsolete? (0) | 2016.06.09 |
---|---|
C# 정확한 Type 의 비교 ( IsAssignableFrom vs is ) (0) | 2016.06.09 |
페이스북 sdk 컴파일 오류 7.5 (0) | 2016.05.01 |
Google.JarResolver.ResolutionException (0) | 2016.04.05 |
Windows 8.1 , Unity 5.2.4f1 Visual studio 2013 Ultimate 설치시 에러 (0) | 2016.04.04 |