| java.lang.Object |
| ↳ |
com.microstrategy.utils.JsonPrettyPrinter |
Class Overview
This class can "pretty-print" JSON text for diagnostic purposes.
Summary
| Public Methods |
|
static
String
|
prettyPrintJSON(File f, int indentLevel)
Pretty Print the JSON in the supplied file using the specified
indentation level.
|
|
static
String
|
prettyPrintJSON(String jsonText, int indentLevel)
Pretty Print the JSON in the supplied string using the specified
indentation level.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
Public Constructors
public
JsonPrettyPrinter
()
Public Methods
public
static
String
prettyPrintJSON
(File f, int indentLevel)
Pretty Print the JSON in the supplied file using the specified
indentation level.
Parameters
| f |
The File object that contains the file to pretty print. |
| indentLevel |
The number of spaces at each indentation level. |
Returns
- A pretty printed version of the text in the file.
Throws
| IllegalArgumentException
| If the supplied file does not exist or
cannot be read.
|
public
static
String
prettyPrintJSON
(String jsonText, int indentLevel)
Pretty Print the JSON in the supplied string using the specified
indentation level.
Parameters
| jsonText |
The JSON text to pretty print. |
| indentLevel |
The number of spaces at each indentation level. |
Returns
- A pretty printed version of the text in the supplied string.