我试图从JSON响应中获取值。我得到的一切工作,除了从以下字符串中提取一个数组: {"o":"1.18988","h":"1.18993","l":"1.18963","c":"1.18993"}
我知道GSON试图解析它,因为我得到这个错误: Exception in thread "main" java.lang.IllegalStateException: Not a JSON Arra
存在我的模型是这样 public class testModel {
public boolean a = true;
public Test2 test2 = new Test2();
public class Test2 {
public boolean b = true;
}
}
像这样 {
"test2":{}
}
一个
我的目标是将实现Collection接口的类序列化为JSON对象而不是JSON数组。以下类是simplyfied例如: public class CollectionImplementation implements Collection<String> {
private final List<String> _wrappedList = new LinkedList<>();