How to convert hashmap to JSON object in Java

前端 未结 29 2515
谎友^
谎友^ 2020-11-22 11:20

How to convert or cast hashmap to JSON object in Java, and again convert JSON object to JSON string?

29条回答
  •  清歌不尽
    2020-11-22 11:59

    This is typically the work of a Json library, you should not try to do it yourself. All json libraries should implement what you are asking for, and you can find a list of Java Json libraries on json.org, at the bottom of the page.

提交回复
热议问题