public class JsonUtils extends Object
| Constructor and Description |
|---|
JsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
readDouble(org.json.simple.JSONObject obj,
String field,
double dflt)
Reads a double field from a JSON object.
|
static int |
readInteger(org.json.simple.JSONObject obj,
String field,
int dflt)
Reads an integer field from a JSON object.
|
static String |
readString(org.json.simple.JSONObject obj,
String field)
Reads a string field from a JSON object.
|
public static String readString(org.json.simple.JSONObject obj, String field)
obj - the object to read fromfield - the field to read frompublic static double readDouble(org.json.simple.JSONObject obj,
String field,
double dflt)
throws IOException
obj - the object to read fromfield - the field to read fromdflt - the default valuedfltIOException - if parsing the double value failspublic static int readInteger(org.json.simple.JSONObject obj,
String field,
int dflt)
throws IOException
obj - the object to read fromfield - the field to read fromdflt - the default valuedfltIOException - if parsing the double value failsCopyright © 2022. All rights reserved.