From 5370444a36a304851c6761909fd94d80eb3726c0 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Wed, 14 Jul 2021 01:34:40 +0100 Subject: [PATCH] roof removal: change override.json file extension to .jsonc JSON itself doesn't natively support true comments (the official way is to include it as data), which means that every syntax highlighter wants to scream when it reads the file, despite the fact that GSON ignores comments perfectly fine. JSONC however supports true comments, and is supported by all the syntax highlighters we use (GH, IJ), while also staying as entirely normal JSON otherwise. --- .../runelite/client/plugins/roofremoval/RoofRemovalPlugin.java | 2 +- .../plugins/roofremoval/{overrides.json => overrides.jsonc} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/{overrides.json => overrides.jsonc} (100%) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java index 67700457ec..a9e92f4420 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java @@ -175,7 +175,7 @@ public class RoofRemovalPlugin extends Plugin private void loadRoofOverrides() throws IOException { - try (InputStream in = getClass().getResourceAsStream("overrides.json")) + try (InputStream in = getClass().getResourceAsStream("overrides.jsonc")) { final InputStreamReader data = new InputStreamReader(in, StandardCharsets.UTF_8); //CHECKSTYLE:OFF diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.json b/runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.jsonc similarity index 100% rename from runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.json rename to runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.jsonc