title: Java Read Parquet File to JSON Output
body: <p>Reading parquet file is working but getting indented format instead of a desired JSON output format. Any ideas? I was thinking that I may need to change GroupRecordConverter but wasn't able to find much documentation. If can point me to that, would also be helpful. Thanks very much for the help. </p>
  
  <pre><code>long num = numLines;
  try {
    ParquetMetadata readFooter = ParquetFileReader.readFooter(conf, path, ParquetMetadataConverter.NO_FILTER);
    MessageType schema = readFooter.getFileMetaData().getSchema();
    ParquetFileReader r = new ParquetFileReader(conf,path,readFooter);
  
    PageReadStore pages = null;
    try{
      while(null != (pages = r.readNextRowGroup())) {
        final long rows = pages.getRowCount();
        System.out.println("Number of rows: " + rows);
  
        final MessageColumnIO columnIO = new ColumnIOFactory().getColumnIO(schema);
        final RecordReader recordReader = columnIO.getRecordReader(pages, new GroupRecordConverter(schema));
        String sTemp = "";
        for(int i=0; i&lt;rows &amp;&amp; num--&gt;0; i++) {
          System.out.println(recordReader.read().toString())
        }
      }
    }
  }
  </code></pre>
  
  <p>Current indented output:</p>
  
  <pre><code>data1: value1
  data2: value2
  models
    map
      key: data3
      value
        array: value3
    map
      key: data4
      value
        array: value4
  data5: value5
  ...
  </code></pre>
  
  <p>Desired JSON output:</p>
  
  <pre><code>"data1": "value1",
  "data2": "value2",
  "models": {
      "data3": [
          "value3"
      ],
      "data4": [
          "value4"
      ]
  },
  "data5": "value5"
  ...
  </code></pre>