Gson, how to deserialize array or empty string

前端 未结 6 2264
长情又很酷
长情又很酷 2020-12-06 20:08

I trying to deserialize this json to array of objects:

[{
    \"name\": \"item 1\",
    \"tags\": [\"tag1\"]
},
{
    \"name\": \"item 2\",
    \"tags\": [\"         


        
6条回答
  •  甜味超标
    2020-12-06 20:37

    Use Jacskon Object Mapper

    See below simple example

    [http://www.mkyong.com/java/how-to-convert-java-object-to-from-json-jackson/][1]

提交回复
热议问题