public static String formatJson ( String json , Map readingArgs , Map writingArgs ) { Map args = new HashMap ( ) ; if ( readingArgs != null ) { args . putAll ( readingArgs ) ; } args . put ( JsonReader . USE_MAPS , true ) ; Object obj = JsonReader . jsonToJava ( json , args ) ; args . clear ( ) ; if ( writingArgs != null ) { args . putAll ( writingArgs ) ; } args . put ( PRETTY_PRINT , true ) ; return objectToJson ( obj , args ) ; }
Format the passed in JSON string in a nice human readable format .