1

I have a string in json format but the string does not have quotes.

[{field1:value1,field2:value2}].

Now I have to convert this string into a ArrayNode using Jackson API. Because the string does not contain any quotes, it is throwing error that it is expecting double quotes. Also, I have already tried

 mapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);

but it is throwing error for values are not inside quotes.

4

1 回答 1

0

您应该将 @JsonRawValue 注释添加到要考虑解析的字段,因此它将相应地引用该字段。

于 2016-12-08T05:40:59.100 回答