问答详情
源自:3-3 使用Java Bean构建对象

数组输出结果里面是empty

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

提问者:慕UI8980686 2016-11-21 12:01

个回答

  • 用户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即可

  • 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}]}