json字符串

1   string字符串转User对象

String str  =  {"oid":"23gdreds21","fullname":"地点","pid":0,"name":0,"uniquecoding":111}

User user = JSON.parseObject(str, User.class);
2   String字符串转数组

String  str1 = [{"jobids":"","oid":"ff808d0","orderby":33669,"positionids":"","uid":"bbd3"}]

orgs = JSONArray.parseArray(str1, Userorg.class);




你可能感兴趣的:(json字符串)