public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
convert(JsonParser p,
JsonGenerator g)
This utility reads data from a
JsonParser and dumps it to a
JsonGenerator. |
static String |
getString(File file)
A simple utility that gets everything in a file as a UTF-8 string.
|
static JsonStructure |
getStructure(CookJsonParser p)
|
public static JsonStructure getStructure(CookJsonParser p)
p - JSON input parser.public static void convert(JsonParser p, JsonGenerator g)
JsonParser and dumps it to a
JsonGenerator. This utility is useful for converting data
from one format to another.
In cookjson-utils package, ConvertJson utility calls this function for command-line based execution.
p - JSON input parser.g - JSON output generator.Copyright © 2016. All rights reserved.