pretty printing json and sorting values
correct utf-8 output for json format