Skip to content

Commit 5114f6e

Browse files
committed
Make JsonData.fromJson public (for now)
1 parent 5e8d1dc commit 5114f6e

File tree

1 file changed

+4
-4
lines changed
  • json-data-utils/src/main/java/net/minecraftforge/util/data/json

1 file changed

+4
-4
lines changed

json-data-utils/src/main/java/net/minecraftforge/util/data/json/JsonData.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,20 @@ public static RunConfig runConfig(String data) {
129129
return fromJson(data, RunConfig.class);
130130
}
131131

132-
protected static <T> T fromJson(File file, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
132+
public static <T> T fromJson(File file, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
133133
try (FileInputStream stream = new FileInputStream(file)) {
134134
return fromJson(stream, classOfT);
135135
} catch (IOException e) {
136136
throw new JsonIOException(e);
137137
}
138138
}
139-
protected static <T> T fromJson(byte[] data, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
139+
public static <T> T fromJson(byte[] data, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
140140
return fromJson(new ByteArrayInputStream(data), classOfT);
141141
}
142-
protected static <T> T fromJson(InputStream stream, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
142+
public static <T> T fromJson(InputStream stream, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
143143
return GSON.fromJson(new InputStreamReader(stream), classOfT);
144144
}
145-
protected static <T> T fromJson(String data, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
145+
public static <T> T fromJson(String data, Class<T> classOfT) throws JsonSyntaxException, JsonIOException {
146146
return GSON.fromJson(data, classOfT);
147147
}
148148

0 commit comments

Comments
 (0)