Sorry for the naming convention nitpicking... on further thought, this is doing more than just sorting a hash - it is recursively sorting a hash and it is also sorting arrays.  I suppose it may also therefore need to recursively recursively sort array values as well if the array happens itself to contain nested arrays and/or hashes.  There may be a more appropriate name such as "sort_json_data" or "sort_json" (and rename the existing 'sort_json' method to something else, since it doesn't actually perform the sorting).