예제 #1
0
 /**
  * Reads a JSON array from the given string.
  *
  * @param string the string that contains the JSON array
  * @return the JSON array that has been read
  * @throws ParseException if the input is not valid JSON
  * @throws UnsupportedOperationException if the input does not contain a JSON array
  */
 public static JsonArray readFrom(String string) {
   return JsonValue.readFrom(string).asArray();
 }
예제 #2
0
 /**
  * Reads a JSON array from the given reader.
  *
  * @param reader the reader to read the JSON array from
  * @return the JSON array that has been read
  * @throws IOException if an I/O error occurs in the reader
  * @throws ParseException if the input is not valid JSON
  * @throws UnsupportedOperationException if the input does not contain a JSON array
  */
 public static JsonArray readFrom(Reader reader) throws IOException {
   return JsonValue.readFrom(reader).asArray();
 }