收藏864
分享
阅读14999
更新时间2022-04-19
在1.2.11版本中,fastjson新增加了对InputStream的支持支持。
package com.alibaba.fastjson;
public abstract class JSON {
public static T parseObject(InputStream is, //
Type type, //
Feature... features) throws IOException;
public static T parseObject(InputStream is, //
Charset charset, //
Type type, //
Feature... features) throws IOException;
} import com.alibaba.fastjson;
import java.nio.charset.Charset;
class Model {
public int value;
}
InputStream is = ...
Model model = JSON.parseObject(is, Model.class);
Model model2 = JSON.parseObject(is, Charset.from("UTF-8"), Model.class);相关
视频
RELATED VIDEOS
科技资讯
1
2
3
4
5
6
7
8
9
精选课程
共5课时
17.2万人学习
共49课时
77万人学习
共29课时
61.7万人学习
共25课时
39.3万人学习
共43课时
71万人学习
共25课时
61.6万人学习
共22课时
23万人学习
共28课时
33.9万人学习
共89课时
125万人学习