JSON类库 Flexjson
openkk
13年前
<div id="p_fullcontent" class="detail"> <p>Flexjson 是一个将 Java 对象转成 JSON 的 类库,是一个深度转换的过程</p> <p><img alt="JSON类库 Flexjson" src="https://simg.open-open.com/show/2d034ec63f8f5034844d3d2e669b432f.jpg" width="567" height="298" /></p> <p>示例代码:</p> <p></p> <pre class="brush:java; toolbar: true; auto-links: false;">public String doSomething( Object arg1, ... ) { Person p = ...load a person...; JSONSerializer serializer = new JSONSerializer(); return serializer.serialize( p ); }</pre> <p></p> <p>执行结果:</p> <p>{ "class": "Person", "name": "William Shakespeare", "birthday": -12802392000000, "nickname": "Bill" }<br /> <br /> </p> <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1324130442703" target="_blank">http://www.open-open.com/lib/view/home/1324130442703</a></p> </div>