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/
320x100
'- > Unity3D 5.x' 카테고리의 다른 글
유니티3D, Invoke함수 (0) | 2015.04.09 |
---|---|
유니티3D, 코루틴(Couroutine) 예제 (0) | 2015.04.09 |
Physics.Raycast() 함수 (0) | 2015.01.20 |
Collider (0) | 2015.01.19 |
Rigidbody.AddForce (0) | 2015.01.16 |
댓글