1. import org.json.JSONArray;
    import org.json.JSONObject;
  2. 将字符串转化为JSONArray   JSONArray  jsonArray = new JSONArray(deviceInfo); //注意字符串的格式
  3. 将JSONArray转化为JSONObject类型 JSONObject jsonObject = jsonArray.getJSONObject(0);
  4. 将值存入Map  Map<String,String> map = HashMap();    map.put("a",jsonObject.getString("a"));
  5. Mybatis传入Map类型的参数
  6. JSONObject和JSONArray 以及Mybatis传入Map类型参数
  7.     <insert >    </insert>

相关文章:

  • 2022-12-23
  • 2021-09-10
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2022-02-18
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
相关资源
相似解决方案