Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-104

Support for streams in com.mongodb.util.JSON

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • API
    • None

    Description

      It would be nice if the JSON class supported streams in addition to strings as sources and targets for JSON during parsing and serialization. In particular, I am interested in providing JSON forms to the parser via an InputStream for situations where (a) the JSON objects are very large and more importantly (b) for situations where you want to parse JSON forms from a source one after the other (i.e. a file with a series of JSON forms one after the other). It would be nice if I could create a parser object, provide it with an Input Stream, and then call parse() repeatedly, with the parser parsing and consuming from the stream one JSON object per call.

      Supporting serialization to OutputStreams would be for symmetry, but also useful for similar reasons.

      Attachments

        1. EJSON.java
          12 kB
        2. EJSONParseException.java
          1 kB

        Activity

          People

            Unassigned Unassigned
            william.shulman@gmail.com William Shulman
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: