public class JSONXMLParser extends Object
| Constructor and Description |
|---|
JSONXMLParser() |
| Modifier and Type | Method and Description |
|---|---|
static void |
parseJSONObject(JSONObject jo,
String xmlStr,
boolean keepStrings)
转换XML为JSONObject
转换过程中一些信息可能会丢失,JSON中无法区分节点和属性,相同的节点将被处理为JSONArray。
|
static void |
parseJSONObject(JSONObject jo,
String xmlStr,
ParseConfig parseConfig)
转换XML为JSONObject
转换过程中一些信息可能会丢失,JSON中无法区分节点和属性,相同的节点将被处理为JSONArray。
|
public static void parseJSONObject(JSONObject jo, String xmlStr, boolean keepStrings) throws JSONException
jo - JSONObjectxmlStr - XML字符串keepStrings - 如果为true,则值保持String类型,不转换为数字或booleanJSONException - 解析异常public static void parseJSONObject(JSONObject jo, String xmlStr, ParseConfig parseConfig) throws JSONException
xmlStr - XML字符串jo - JSONObjectparseConfig - 解析选项JSONException - 解析异常Copyright © 2025. All rights reserved.