title: How to compare big JSONs?
body: <p>Have 2 big JSON (~GB) files created from same source by code, that should work exactly same, but there should be some small differences sometimes.</p>
  
  <p>Want to be sure both conversions did same job and properly. Made small project to convert JSONs to kind of CSV with path to elements and its content (single value or arrays/objects). Planning to compare "CSV" JSONs by any text diff then.</p>
  
  <p><a href="https://github.com/eltomjan/ETEhomeTools/tree/master/CSharp/MultiConvert" rel="nofollow noreferrer">Source (on my GitHub)</a> is quite long for limitted space here and is not main part of the question. It is not working properly generally (tested on a big simple JSON and another shown here, did not want to use recursion, code is quite tricky).</p>
  
  <p>Example export of <a href="http://www.shinarp.com/Spry/samples/data_region/JSONDataSetSample.html#Example4" rel="nofollow noreferrer">JSON Data Set Sample # Example 4</a> to ilustrate my idea when ID set to <b>type, Horizontal format</b> and <b>Sort All</b> looks like:</p>
  
  <pre><code>batters\batter\Blueberry\   id  1003
  batters\batter\Devil's Food\    id  1004
  batters\batter\Chocolate\   id  1002
  batters\batter\Regular\ id  1001
  donut\  id  0001    name    Cake    ppu 0.55
  topping\Glazed\ id  5002
  topping\Chocolate with Sprinkles\   id  5006
  topping\Chocolate\  id  5003
  topping\Maple\  id  5004
  topping\None\   id  5001
  topping\Powdered Sugar\ id  5007
  topping\Sugar\  id  5005
  </code></pre>
  
  <p><H1>Is it a good idea or are there any better options ?</H1></p>
  
  <p><i>Processed JSON preview:</i></p>
  
  <pre><code>{ "type": "donut",
    "id": "0001", "name": "Cake", "ppu": 0.55,
    "batters": { "batter": [ {
          "id": "1001", "type": "Regular"
        },{
          "id": "1002", "type": "Chocolate"
        },{
          "id": "1003", "type": "Blueberry"
        },{
          "id": "1004", "type": "Devil's Food"
    }]},
    "topping": [ {
        "id": "5001", "type": "None"
      },{
        "id": "5002", "type": "Glazed"
      },{
        "id": "5005", "type": "Sugar"
      }, ...
  </code></pre>