How to serialize Object to JSON?

前端 未结 7 1643
面向向阳花
面向向阳花 2020-11-27 05:49

I need to serialize some objects to a JSON and send to a WebService. How can I do it using the org.json library? Or I\'ll have to use another one? Here is the class I need t

相关标签:
7条回答
  • 2020-11-27 06:18

    GSON is easy to use and has relatively small memory footprint. If you loke to have even smaller footprint, you can grab:

    https://github.com/ko5tik/jsonserializer

    Which is tiny wrapper around stripped down GSON libraries for just POJOs

    0 讨论(0)
提交回复
热议问题