public class JSONArrayUtils extends Object
| Constructor and Description |
|---|
JSONArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static net.minidev.json.JSONArray |
parse(String s)
Parses a JSON array.
|
static List<String> |
toStringList(net.minidev.json.JSONArray jsonArray)
Converts the specified JSON array to a string list.
|
static List<URI> |
toURIList(net.minidev.json.JSONArray jsonArray)
Converts the specified JSON array to a URI list.
|
public JSONArrayUtils()
public static net.minidev.json.JSONArray parse(String s) throws ParseException
Specific JSON to Java entity mapping (as per JSON Simple):
java.lang.Number.
long.
double.
s - The JSON array string to parse. Must not be null.ParseException - If the string cannot be parsed to a JSON
array.public static List<String> toStringList(net.minidev.json.JSONArray jsonArray)
jsonArray - The JSON array. May be null.null or empty.public static List<URI> toURIList(net.minidev.json.JSONArray jsonArray) throws ParseException
jsonArray - The JSON array. May be null.null or empty.ParseException - If a JSON array item couldn't be parsed to a
URI.Copyright © 2017 Connect2id Ltd.. All rights reserved.