标签:hone ring Staff one code seo rgs fast name
public class jsonTest { public static void main(String[] args) { /** * json字符串转化为对象 */ String jsonString = "{name:‘Antony‘,age:‘12‘,sex:‘male‘,telephone:‘88888‘}"; Staff staff = JSON.parseObject(jsonString, Staff.class); System.out.println(staff.toString()); /** * 对象转化为json字符串 */ String jsonStr = JSON.toJSONString(staff); System.out.println(jsonStr); } }
标签:hone ring Staff one code seo rgs fast name
原文地址:https://www.cnblogs.com/lovemeng1314/p/11688494.html