文章分类 -  fastjson

摘要:fastjson序列化,默认是用字母排序, 那么怎么来实现按照自己定义的顺序输出,想要的json串呢? 直接上代码: package com.zpxinfu.test.testcase.interFace; import com.alibaba.fastjson.annotation.JSONTyp 阅读全文
posted @ 2017-12-27 12:01 javaeelwh 阅读(410) 评论(0) 推荐(0)
摘要:总结: 1:数组转换成json格式字符串 JSON.toJSONString(arr,true) 2:json格式字符串转换为数组 String jsonText = "[\"bill\",\"green\",\"maks\",\"jim\"]"; JSON.parseArray(jsonText) 阅读全文
posted @ 2017-05-11 21:52 javaeelwh 阅读(1010) 评论(0) 推荐(0)
摘要:什么事JSON? JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。 易于人阅读和编写。同时也易于机器解析和生成。 它基于JavaScript Programming Language, Standard ECMA-262 3rd Edition - De 阅读全文
posted @ 2017-05-11 17:33 javaeelwh 阅读(112) 评论(0) 推荐(0)