魔乐社区 json转string(json转string后变成等号了)

json转string(json转string后变成等号了)

怎么将JSON格式的串转换成String数组你可以用正则表达式:List names = new ArrayList();List ids = new ArrayList();Pattern p = Pattern.compile("\"(.*?)\",\"(.*?)\"") ;Matcher m = p.matche...

yetaoseo  ·  2021-12-10 15:50:14 发布

怎么将JSON格式的串转换成String数组

你可以用正则表达式:List names = new ArrayList();List ids = new ArrayList();Pattern p = Pattern.compile("\"(.*?)\",\"(.*?)\"") ;Matcher m = p.matcher(s);while(m.find()){ names.add(m.group(1)); ids.add(m.group(2));}

json转string

怎么将JSON格式的串转换成String数组

你可以用正则表达式:List names = new ArrayList();List ids = new ArrayList();Pattern p = Pattern.compile("\"(.*?)\",\"(.*?)\"") ;Matcher m = p.matcher(s);while(m.find()){ names.add(m.group(1)); ids.add(m.group(2));}

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐

  • 浏览量 687
  • 收藏 0
  • 0

所有评论(0)

查看更多评论 
已为社区贡献58条内容