更新时间:2022-09-01 GMT+08:00
分享

JSONHelper类说明

路径

com.huawei.livedata.lambdaservice.util.JSONHelper

说明

提供Json与Xml、Map之间的相互转换。

方法列表

返回类型

方法和说明

static String

json2Xml(String json)

json转xml

static String

xml2Json(String xml)

xml转json

static String

json2XmlWithoutType(String json)

json转xml

static HashMap

jsonToMap(String json)

json转map

方法详情

  • public static String json2Xml(String json)

    json转xml

    输入参数

    json:json格式的字符串

    返回信息

    返回xml格式字符串

  • public static String xml2Json(String xml)

    xml转json

    输入参数

    xml:xml格式的字符串

    返回信息

    返回json格式字符串

  • public static String json2XmlWithoutType(String json)

    json转xml

    输入参数

    json:json格式的字符串

    返回信息

    返回xml格式字符串

  • public static HashMap jsonToMap(String json)

    json转map

    输入参数

    json:json格式的字符串

    返回信息

    返回map格式字符串

分享:

    相关文档

    相关产品