Package com.bluersw.analyze
Class JsonFormat
java.lang.Object
com.bluersw.analyze.AbstractFormat
com.bluersw.analyze.JsonFormat
- All Implemented Interfaces:
Configuration
解析JSON格式文档 Parsing JSON format documents
- Author:
- sunweisheng
-
Field Summary
Fields inherited from class com.bluersw.analyze.AbstractFormat
content, data, index -
Constructor Summary
ConstructorsConstructorDescriptionJsonFormat(InputStream inputStream) 构造函数 ConstructorJsonFormat(String jsonContent) 构造函数 Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected LinkedHashMap<String, Object> loadData()加载JSON内容并结构化为LinkedHashMap Load JSON content and structure it as LinkedHashMapMethods inherited from class com.bluersw.analyze.AbstractFormat
getValueListBySearch
-
Constructor Details
-
JsonFormat
构造函数 Constructor- Parameters:
jsonContent- JSON内容 JSON content- Throws:
Exception- 父类加载数据时或转化结构时可能抛出异常 Exceptions may be thrown when the parent class loads data or transforms structures
-
JsonFormat
构造函数 Constructor- Parameters:
inputStream- JSON格式文件的流对象 Stream object of JSON format file- Throws:
Exception- 父类加载数据时或转化结构时可能抛出异常 Exceptions may be thrown when the parent class loads data or transforms structures
-
-
Method Details
-
loadData
加载JSON内容并结构化为LinkedHashMap Load JSON content and structure it as LinkedHashMap- Specified by:
loadDatain classAbstractFormat- Returns:
- JSON内容的LinkedHashMap结构 LinkedHashMap structure of JSON content
- Throws:
Exception- 结构转化时可能会抛出异常 Exceptions may be thrown during structural transformation
-