public class JoltCliUtilities
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIFFY_COMMAND_IDENTIFIER |
static java.lang.String |
SORT_COMMAND_IDENTIFIER |
static java.lang.String |
TRANSFORM_COMMAND_IDENTIFIER |
Constructor and Description |
---|
JoltCliUtilities() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
createJsonObjectFromFile(java.io.File file,
boolean suppressOutput)
Uses the File to build a Map containing JSON data found in the file.
|
static boolean |
printJsonObject(java.lang.Object output,
java.lang.Boolean uglyPrint,
boolean suppressOutput)
Prints the given json object to standard out, accounting for pretty printing and suppressed output.
|
static void |
printToStandardOut(java.lang.String output,
boolean suppressOutput)
Prints the given string to standard out, or doesn't, based on the suppressOutput flag
|
static java.lang.Object |
readJsonInput(java.io.File file,
boolean suppressOutput)
This method will read in JSON, either from the given file or from standard in
if the file is null.
|
public static final java.lang.String DIFFY_COMMAND_IDENTIFIER
public static final java.lang.String SORT_COMMAND_IDENTIFIER
public static final java.lang.String TRANSFORM_COMMAND_IDENTIFIER
public static void printToStandardOut(java.lang.String output, boolean suppressOutput)
public static java.lang.Object createJsonObjectFromFile(java.io.File file, boolean suppressOutput)
public static boolean printJsonObject(java.lang.Object output, java.lang.Boolean uglyPrint, boolean suppressOutput)
output
- The object to print. This method will fail if this object is not well formed JSON.uglyPrint
- ignore pretty printsuppressOutput
- suppress output to standard outpublic static java.lang.Object readJsonInput(java.io.File file, boolean suppressOutput)
file
- the file to read the input from, or null to use standard insuppressOutput
- suppress output of error messages to standard out