title: How sort all json pairs "key" : "value" by keys?
body: <p>So, I have the next <code>json</code>:</p>
  
  <pre><code>{
       "massive2":[
           "a",
           "c",
           "b"
       ],
       "key5":"val5",
       "key2":"val2",
       "massive1":[
            "3",
            "4",
            "2",
            "1"
      ],
      "key3":"val3",
      "key4":"val4",
      "key1":"val1"
  }
  </code></pre>
  
  <p>How can I sort all pairs by key and all elements in all massives (to the end of <code>json</code> tree) in alphabetical, or if it is massive in some other order to get <code>json</code> like this:</p>
  
  <pre><code>{
       "key1":"val1",
       "key2":"val2",
       "key3":"val3",
       "key4":"val4",
       "key5":"val5",
       "massive1":[
            "1",
            "2",
            "3",
            "4"
      ],
       "massive2":[
           "a",
           "b",
           "c"
       ]
  }
  </code></pre>
  
  <p>I don't know beforehand how deep my <code>json</code> will be.
  Maybe there are some java libraries for this?</p>