Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经开始使用改造来处理 json,使用 jsonschema2pojo 来生成我的模型。但是我遇到了一个问题,Json 中的一个字段既可以是数组也可以是对象。有人可以给我建议如何解决这个问题吗?
我找到了解决方案。如果存在多选 beetwen 数组或对象,需要将问题字段类更改为 JsonElement,更改 setter、getter 中的 args,模型将被创建并可供使用。