mirror of https://github.com/alibaba/fastjson2.git
docs(JSONB): 更新 JSONB 解析配置示例
将 JSONB 解析配置示例中的 JSONReader.Feature 从 SupportBeanArrayMapping 修改为 SupportArrayToBean,以反映正确的配置选项。
This commit is contained in:
parent
88873ce86e
commit
08c2f3089d
|
|
@ -371,7 +371,7 @@ byte[] bytes = JSONB.toBytes(user, JSONWriter.Feature.BeanToArray);
|
|||
```java
|
||||
byte[] bytes = ...
|
||||
User user = JSONB.parseObject(bytes, User.class);
|
||||
User user = JSONB.parseObject(bytes, User.class, JSONReader.Feature.SupportBeanArrayMapping);
|
||||
User user = JSONB.parseObject(bytes, User.class, JSONReader.Feature.SupportArrayToBean);
|
||||
```
|
||||
|
||||
### 3.2 使用`JSONPath`
|
||||
|
|
|
|||
Loading…
Reference in New Issue