JSON and Generics in Java - Type safety warning

后端 未结 7 1426
逝去的感伤
逝去的感伤 2020-12-10 05:05

I have some data stored in Java elements and I need to return it in a given format - JSONObject. While my implementation works fine, I\'m still getting a warning message fro

7条回答
  •  眼角桃花
    2020-12-10 05:40

    FYI org.codehaus.jettison.json.JSONObject will not cause this warning. When using codehaus' JSONObject, you also have the ability to catch parsing errors via org.codehaus.jettison.json.JSONException. See https://github.com/codehaus/jettison for details.

提交回复
热议问题