src/main/java/convex/java/JSON.java
/**
     * Parses a JSON input stream
     * @param <T> Return type
     * @param content Any InputStream containing JSON conent in UTF-8
     * @return Parsed JSON Object
     */
Parses a JSON input stream
@param  Return type
@param content Any InputStream containing JSON conent in UTF-8
@return Parsed JSON Object
Parses a JSON input stream @param Return type @param content Any InputStream containing JSON conent in UTF - 8 @return Parsed JSON Object
@SuppressWarnings("unchecked")
	public static <T> T parse(InputStream content) {
		JSONParser parser=new JSONParser();
		Reader reader=new InputStreamReader(content, StandardCharsets.UTF_8);
		Object parsed;
		try {
			parsed = parser.parse(reader);
		} catch (IOException e) {
			throw new Error("IO Error reading JSON: " + e.getMessage(), e);
		}  catch (ParseException e) {
        	throw new Error("Error in JSON parsing: " + e.getMessage(), e);
        }
		return (T) parsed;
	}
@ SuppressWarnings ( "unchecked" ) public static < T > T parse ( InputStream content ) { JSONParser parser = new JSONParser ( ) ; Reader reader = new InputStreamReader ( content , StandardCharsets . UTF_8 ) ; Object parsed ; try { parsed = parser . parse ( reader ) ; } catch ( IOException e ) { throw new Error ( "IO Error reading JSON: " + e . getMessage ( ) , e ) ; } catch ( ParseException e ) { throw new Error ( "Error in JSON parsing: " + e . getMessage ( ) , e ) ; } return ( T ) parsed ; }
Parses a JSON input stream
 @param <T> Return type
 @param content Any InputStream containing JSON conent in UTF-8
 @return Parsed JSON Object
Parses a JSON input stream @param <T > Return type @param content Any InputStream containing JSON conent in UTF - 8 @return Parsed JSON Object