Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11773

[Rust] Allow json writer to write out JSON arrays as well as newline formatted objects

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • Rust

    Description

      Currently the arrow json writer makes JSON that looks like this (one record per line):
      ```

      {"foo":1} {"bar":1}

      ```

      Whereas a JSON array looks like this
      ```
      [

      {"foo":1}

      ,

      {"bar":1}

      ]
      ```
      It would be nice to write out json in a streaming fashion (we added such a feature in IOx via https://github.com/influxdata/influxdb_iox/pull/870/files)

      /// Writes out well formed JSON arays in a streaming fashion
      ///
      /// [

      {"foo": "bar"}

      ,

      {"foo": "baz"}

      ]
      ///
      /// This is based on the arrow JSON writer (json::writer::Writer)

      Attachments

        Issue Links

          Activity

            People

              alamb Andrew Lamb
              alamb Andrew Lamb
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m