public static String prettyPrint(String jsonPayload) {
        int indent = 0;
        StringBuilder output = new StringBuilder();
        JsonLexer lexer = new JsonLexer(new StringReader(jsonPayload));
        while (lexer.hasNext()) {
            JsonToken token = lexer.next();
            if (token.getType() == JsonTokenType.OPEN_CURLY) {
                indent += 4;
                output.append("{\n").append(nSpance(indent));
            } else if (token.getType() == JsonTokenType.CLOSE_CURLY) {
                indent -= 4;
                output.append("\n").append(nSpance(indent)).append("}");
            } else if (token.getType() == JsonTokenType.OPEN_BRACKET) {
                indent += 4;
                output.append("[\n").append(nSpance(indent));
            } else if (token.getType() == JsonTokenType.CLOSE_BRACKET) {
                indent -= 4;
                output.append("\n").append(nSpance(indent)).append("]");
            } else if (token.getType() == JsonTokenType.COMMA) {
                output.append(",\n").append(nSpance(indent));
            } else if (token.getType() == JsonTokenType.COLON) {
                output.append(": ");
            } else if (token.getType() == JsonTokenType.STRING) {
                String textStr = token.getText();
                String textWithoutQuotes = textStr.substring(1, textStr.length() - 1);
                output.append("\"" + StringEscapeUtils.escapeJava(textWithoutQuotes) + "\"");
            } else {
                output.append(token.getText());
            }
        }

        return output.toString();
    }