Converting Map into json

前端 未结 4 1875
长情又很酷
长情又很酷 2021-02-15 16:40

I have Map in java like this :

{card_switch=Master, issuing_bank=ICCI, card_Type=DebitCard}

I\'m using the s

4条回答
  •  青春惊慌失措
    2021-02-15 17:18

    Try this. But do you need the gson library:

    Map map = new HashMap<>();
    String value = new Gson().toJson(map);
    

提交回复
热议问题