INNER CODE UNIT · Java

parse

alibaba/fastjson2 · core/src/main/java/com/alibaba/fastjson2/JSON.java:426

    static Object parse(InputStream in, Charset charset) {
        return parse(in, charset, JSONFactory.createReadContext());
    }

    /**
     * Parses the json stream as a {@link JSONArray} or {@link JSONObject}.
     * Returns {@code null} if received {@link InputStream} is {@code null} or empty.
     *
     * @param in the specified stream to be parsed
     * @param charset the specified charset of the stream
     * @param context the specified custom context
     * @return either {@link JSONArray} or {@link JSONObject} or null
     * @throws JSONException If a parsing error occurs
     * @throws NullPointerException If received context is null
     * @since 2.0.61
     */
    static Object parse(InputStream in, Charset charset, JSONReader.Context context) {
        if (in == null) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…