Example usage for com.badlogic.gdx.utils JsonValue prettyPrint

List of usage examples for com.badlogic.gdx.utils JsonValue prettyPrint

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils JsonValue prettyPrint.

Prototype

public String prettyPrint(PrettyPrintSettings settings) 

Source Link

Usage

From source file:es.eucm.gleaner.tracker.format.XAPIFormat.java

License:Apache License

public String serialize(ArrayList<String> traces) {
    statements.clear();/*from   w  w  w.j a  v  a 2 s . c om*/
    for (String trace : traces) {
        statements.add(createStatement(trace));
    }
    String result = "[";
    for (JsonValue s : statements) {
        result += s.prettyPrint(prettyPrintSettings) + ",";
        pool.free(s);
    }
    return result.substring(0, result.length() - 1).replaceAll("[\n\t]", "").replace(": ", ":") + "]";
}