数组输出结果里面是empty

来源:3-3 使用Java Bean构建对象

慕UI8980686

2016-11-21 12:01

{"car":null,"birthday":"1990-01-01","school":"蓝翔","has_girlfriend":false,"age":25.2,"name":"王小二","house":null,"comment":"这是一个注释","major":[{"bytes":[{},{},{},{},{},{}],"empty":false},{"bytes":[{},{},{},{},{},{},{},{},{}],"empty":false}]}

写回答 关注

3回答

  • 用户1098335
    2017-05-11 10:11:08

    我也遇到了同样的问题换一下包就行了

  • lol_chen
    2016-12-07 15:35:49

    <dependency>
     <groupId>org.json</groupId>
     <artifactId>json</artifactId>
     <version>20160810</version>
    </dependency>

    把org.json的maven依赖的版本改成20160810即可

    栗喵

    不好意思,你说的是对的,我的包没有下载成功

    2017-10-30 16:40:11

    共 2 条回复 >

  • qq_海角天涯_1
    2016-11-21 19:53:18

    {"car":null,"birthday":"1990-01-01","school":"蓝翔","has_girlfriend":false,"age":25.2,"name":"王小二","house":null,"comment":"这是一个注释","major":[{"bytes":[{},{},{},{},{},{}],"empty":false},{"bytes":[{},{},{},{},{},{},{},{},{}],"empty":false}]}

    九点半0

    怎么解决?

    2017-02-18 14:36:42

    共 1 条回复 >

JSON快速入门(Java版)

JSON和GSON的应用,JSON快速入门视频教程,赶快加入吧

102048 学习 · 163 问题

查看课程

相似问题