LenientJsonParser .java

net.minecraft.util.LenientJsonParser (class, 18 lines): members: parse. imports: JsonIOException, JsonParser, JsonSyntaxException, JsonElement.

net.minecraft.utilclass18 linescommon511 B

API Surface (2)

JsonElement parse(final Reader reader)
JsonElement parse(final String json)

Full Source

LenientJsonParser.java18 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.util;
2
3
import com.google.gson.JsonElement;
4
import com.google.gson.JsonIOException;
5
import com.google.gson.JsonParser;
6
import com.google.gson.JsonSyntaxException;
7
import java.io.Reader;
8
9
public class LenientJsonParser {
10
	public static JsonElement parse(final Reader reader) throws JsonIOException, JsonSyntaxException {
11
		return JsonParser.parseReader(reader);
12
	}
13
14
	public static JsonElement parse(final String json) throws JsonSyntaxException {
15
		return JsonParser.parseString(json);
16
	}
17
}
18

Decompiled Minecraft 26.3 source of LenientJsonParser (net/minecraft/util/LenientJsonParser.java) with Mojang official mappings, stored verbatim on the site.