Unity3D/Problems
LitJSON Limitations/Warnings
일등하이
2016. 5. 10. 15:33
반응형
LitJSON 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/
반응형