com.bazaarvoice.jolt
public class JoltCliUtilities extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DIFFY_COMMAND_IDENTIFIER |
static String |
SORT_COMMAND_IDENTIFIER |
static String |
TRANSFORM_COMMAND_IDENTIFIER |
| Constructor and Description |
|---|
JoltCliUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
createJsonObjectFromFile(File file,
boolean suppressOutput)
Uses the File to build a Map containing JSON data found in the file.
|
static boolean |
printJsonObject(Object output,
Boolean uglyPrint,
boolean suppressOutput)
Prints the given json object to standard out, accounting for pretty printing and suppressed output.
|
static void |
printToStandardOut(String output,
boolean suppressOutput)
Prints the given string to standard out, or doesn't, based on the suppressOutput flag
|
static Object |
readJsonInput(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 String DIFFY_COMMAND_IDENTIFIER
public static final String SORT_COMMAND_IDENTIFIER
public static final String TRANSFORM_COMMAND_IDENTIFIER
public static void printToStandardOut(String output, boolean suppressOutput)
public static Object createJsonObjectFromFile(File file, boolean suppressOutput)
public static boolean printJsonObject(Object output, 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 Object readJsonInput(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 outCopyright © 2014. All Rights Reserved.