Java 的 JSON 库,fastjson 1.1.23 发布
openkk 12年前
<p>fastjson是目前最快的java json库。</p> <p>这个版本增加对javassist代理对象的支持,使得fastjson能够处理hibernate 4中的代理对象。</p> <p>增加了新自定义序列化的SimplePreFilter,支持在调用getter之前做过滤,具体看这里:<a class="external-link" href="/misc/goto?guid=4958521650151421346" rel="nofollow">http://code.alibabatech.com/wiki/pages/viewpage.action?pageId=7673519</a>。</p> <h3><a name="ReleaseNotes(1.1.23)-Bug"></a>Bug</h3> <p><a class="external-link" href="/misc/goto?guid=4958521650264281426" rel="nofollow">FASTJSON-160</a> - 在asm禁用的场景,字段名忽略大小写不起作用<br /> <a class="external-link" href="/misc/goto?guid=4958521650379700509" rel="nofollow">FASTJSON-161</a> - 多层泛型对象反序列化某些场景出错<br /> <a class="external-link" href="/misc/goto?guid=4958521650473313440" rel="nofollow">FASTJSON-165</a> - ASM在计算double类型的opstack大小不对</p> <h3><a name="ReleaseNotes(1.1.23)-Improvement"></a>Improvement</h3> <p><a class="external-link" href="/misc/goto?guid=4958521650578121668" rel="nofollow">FASTJSON-158</a> - Parser缺省支持类型为Number的JSON串<br /> <a class="external-link" href="/misc/goto?guid=4958521650685516492" rel="nofollow">FASTJSON-159</a> - 支持Groovy对象<br /> <a class="external-link" href="/misc/goto?guid=4958521650786982396" rel="nofollow">FASTJSON-162</a> - 序列化支持Javassist代理对象</p> <h3><a name="ReleaseNotes(1.1.23)-NewFeature"></a>New Feature</h3> <p><a class="external-link" href="/misc/goto?guid=4958521650882152861" rel="nofollow">FASTJSON-163</a> - 提供一个用于过滤字段的SimpleNamePreFilter<br /> <a class="external-link" href="/misc/goto?guid=4958521650969020081" rel="nofollow">FASTJSON-164</a> - 提供一个PascalNameFilter<br /> <a class="external-link" href="/misc/goto?guid=4958521651062446739" rel="nofollow">FASTJSON-166</a> - 反序列化支持GetOnly的Collection类型属性</p> <h2><a name="ReleaseNotes(1.1.23)-下载"></a>下载</h2> <p>如果你使用maven,在pom.xml中加入:</p> <div style="border-right-width:1px;border-top-width:1px;border-bottom-width:1px;border-left-width:1px;" class="code panel"> <div class="codeContent panelContent"> <div> <div id="highlighter_659950" class="syntaxhighlighter nogutter java"> <table class="ke-zeroborder" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="code"> <div class="container" title="Hint: double-click to select code"> <div class="line number1 index0 alt2"> <code class="java plain"><dependency></code> </div> <div class="line number2 index1 alt1"> <code class="java spaces"> </code> <code class="java plain"><groupId>com.alibaba</groupId></code> </div> <div class="line number3 index2 alt2"> <code class="java spaces"> </code> <code class="java plain"><artifactId>fastjson</artifactId></code> </div> <div class="line number4 index3 alt1"> <code class="java spaces"> </code> <code class="java plain"><version></code> <code class="java value">1.1</code> <code class="java plain">.</code> <code class="java value">23</code> <code class="java plain"></version></code> </div> <div class="line number5 index4 alt2"> <code class="java plain"></dependency></code> </div> </div> </td> </tr> </tbody> </table> </div> </div> </div> </div> <p>或者你直接从这些地方下载:</p> <ul> <li><a class="external-link" href="/misc/goto?guid=4958521651159182076" rel="nofollow">http://central.maven.org/maven2/com/alibaba/fastjson/</a></li> <li><a class="external-link" href="/misc/goto?guid=4958347812024310998" rel="nofollow">http://code.alibabatech.com/mvn/releases/com/alibaba/fastjson/</a></li> <li><a class="external-link" href="/misc/goto?guid=4958521651272278975" rel="nofollow">https://github.com/AlibabaTech/fastjson/downloads</a></li> </ul> <h2><a name="ReleaseNotes(1.1.23)-感谢"></a>感谢</h2> <p>flym和林哥为PropertyPreFilter的实现提供了宝贵的意见。<a class="external-link" href="/misc/goto?guid=4958521650473313440" rel="nofollow">FASTJSON-165</a>是flym对fastjson做code review时发现的。</p>