Is there a SaxParser that reads json and fires events so it looks like xml

后端 未结 3 933
花落未央
花落未央 2020-12-09 16:23

This would be great as it would allow my xml stuff to read json w/out any change except for the different sax parser.

3条回答
  •  半阙折子戏
    2020-12-09 17:18

    If you meant, event-based parser then there are a couple of projects out there that do this:

    1. http://code.google.com/p/json-simple/

      Stoppable SAX-like interface for streaming input of JSON text

      This project has moved to https://github.com/fangyidong/json-simple

    2. http://jackson.codehaus.org/Tutorial

      Jackson Streaming API is similar to Stax API

      This project has moved to https://github.com/FasterXML/jackson-core

提交回复
热议问题