/** * @param in * Stream containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. * @throws IOException if unable to parse * @deprecated use {@link #parse(Reader, boolean)} */ @Deprecated public static Object parse(InputStream in, boolean stripOuterComment) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),stripOuterComment); }
/** * @deprecated use {@link #parse(Reader, boolean)} * @param in * Stream containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in, boolean stripOuterComment) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),stripOuterComment); }
/** * @deprecated use {@link #parse(Reader, boolean)} * @param in * Stream containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in, boolean stripOuterComment) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),stripOuterComment); }
/** * @deprecated use {@link #parse(Reader, boolean)} * @param in * Stream containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in, boolean stripOuterComment) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),stripOuterComment); }
/** * @deprecated use {@link #parse(Reader)} * @param in * Reader containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),false); }
/** * Convert JSON to Object * * @param json * The json to convert * @return The object */ public Object fromJSON(String json) { Source source = new StringSource(json); return parse(source); }
/** * @param s * String containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. */ public static Object parse(String s, boolean stripOuterComment) { return DEFAULT.parse(new StringSource(s),stripOuterComment); }
/** * @deprecated use {@link #parse(Reader, boolean)} * @param in * Stream containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in, boolean stripOuterComment) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),stripOuterComment); }
/** * @deprecated use {@link #parse(Reader)} * @param in * Reader containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),false); }
/** * Convert JSON to Object * * @param json * The json to convert * @return The object */ public Object fromJSON(String json) { Source source = new StringSource(json); return parse(source); }
/** * @param s * String containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. */ public static Object parse(String s) { return DEFAULT.parse(new StringSource(s),false); }
/** * @deprecated use {@link #parse(Reader)} * @param in * Reader containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),false); }
/** * @param in * Reader containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. * @throws IOException if unable to parse * @deprecated use {@link #parse(Reader)} */ @Deprecated public static Object parse(InputStream in) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),false); }
/** * Convert JSON to Object * * @param json * The json to convert * @return The object */ public Object fromJSON(String json) { Source source = new StringSource(json); return parse(source); }
/** * @param s * String containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. */ public static Object parse(String s, boolean stripOuterComment) { return DEFAULT.parse(new StringSource(s),stripOuterComment); }
/** * @param s * String containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. */ public static Object parse(String s) { return DEFAULT.parse(new StringSource(s),false); }
public T[] parse(String json) throws ParseException { try { Object object = _messagesParser.parse(new JSON.StringSource(json)); return adapt(object); } catch (Exception x) { throw (ParseException)new ParseException(json, -1).initCause(x); } }
/** * @param s * String containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. */ public static Object parse(String s) { return DEFAULT.parse(new StringSource(s),false); }
/** * @param s * String containing JSON object or array. * @param stripOuterComment * If true, an outer comment around the JSON is ignored. * @return A Map, Object array or primitive array parsed from the JSON. */ public static Object parse(String s, boolean stripOuterComment) { return DEFAULT.parse(new StringSource(s),stripOuterComment); }
/** * @deprecated use {@link #parse(Reader)} * @param in * Reader containing JSON object or array. * @return A Map, Object array or primitive array parsed from the JSON. */ @Deprecated public static Object parse(InputStream in) throws IOException { return DEFAULT.parse(new StringSource(IO.toString(in)),false); }