ちょっと、私はジャクソンのデシリアライゼーションに基づいて問題を抱えています。ジャクソンのエラー予期せぬ文字( '}'(コード125))
ERROR:com.fasterxml.jackson.core.JsonParseException:予期しない文字( '}'(コード125)):二重引用符が
フィールド名を開始するために期待していたJavaコード
List<Contact> ds = mapper.readValue(data, mapper.getTypeFactory().constructCollectionType(List.class, Contact.class));
//OR this one
List<Contact> ds = mapper.readValue(data, new TypeReference<List<Contact>>() {});
マイJSON
[
{
"id": "200",
"name": "Alexia Milano",
"email": "[email protected]",
"prenom": "xx-xx-xxxx,x - street, x - country",
}, {
"id": "201",
"name": "Johnny Depp",
"email": "[email protected]",
"prenom": "xx-xx-xxxx,x - street, x - country",
}
]
jsonバリデーターツールをありがとう。私はjsbeautiferだけを使用していましたが、これは以前のことでした。 – Rollyng
非常に参考になりました – Jay