是否有一个SaxParser读取json并触发事件,因此它看起来像xml [英] Is there a SaxParser that reads json and fires events so it looks like xml
本文介绍了是否有一个SaxParser读取json并触发事件,因此它看起来像xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这会很棒,因为除了不同的sax解析器之外,它允许我的xml内容读取json w / out任何更改。
This would be great as it would allow my xml stuff to read json w/out any change except for the different sax parser.
推荐答案
如果你的意思是,基于事件的解析器那么有几个项目可以做到这一点:
If you meant, event-based parser then there are a couple of projects out there that do this:
用于JSON文本流输入的可停止SAX类接口
Stoppable SAX-like interface for streaming input of JSON text
此项目有转移到 https://github.com/fangyidong/json-simple
http:// jackson .codehaus.org / Tutorial
Jackson Streaming API类似于Stax API
Jackson Streaming API is similar to Stax API
此项目已移至 https://github.com/FasterXML/jackson-core
这篇关于是否有一个SaxParser读取json并触发事件,因此它看起来像xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文