api / tv.twelvetone.json / JsonArray / readFrom

readFrom

fun readFrom(reader: Reader): JsonArray
Deprecated: Use {@link Json#parse(Reader)}{@link JsonValue#asArray() .asArray()} instead

Reads a JSON array from the given reader.

Characters are read in chunks and buffered internally, therefore wrapping an existing reader in an additional BufferedReader does not improve reading performance.

Parameters

reader - the reader to read the JSON array from

Exceptions

IOException - if an I/O error occurs in the reader ParseException - if the input is not valid JSON UnsupportedOperationException - if the input does not contain a JSON array

Return
the JSON array that has been read

fun readFrom(string: String): JsonArray
Deprecated: Use {@link Json#parse(String)}{@link JsonValue#asArray() .asArray()} instead

Reads a JSON array from the given string.

Parameters

string - the string that contains the JSON array

Exceptions

ParseException - if the input is not valid JSON UnsupportedOperationException - if the input does not contain a JSON array

Return
the JSON array that has been read