public static void exportVertsToJson(String filePath, Map<String, Vertex5[]> vertGroups) {
        try(PrintWriter writer = new PrintWriter(filePath)) {
            JsonWriter jsonWriter = new JsonWriter(writer);
            jsonWriter.setIndent("    ");

            jsonWriter.beginObject();
            for (var entry : vertGroups.entrySet()) {
                jsonWriter.name(entry.getKey());

                jsonWriter.beginArray();
                for (int i = 0; i < entry.getValue().length; i++) {
                    Vertex5 vertex = entry.getValue()[i];
                    jsonWriter.beginObject();
                    jsonWriter.name("x").value(vertex.vec.x);
                    jsonWriter.name("y").value(vertex.vec.y);
                    jsonWriter.name("z").value(vertex.vec.z);
                    jsonWriter.name("u").value(vertex.uv.u);
                    jsonWriter.name("v").value(vertex.uv.v);
                    jsonWriter.endObject();
                }
                jsonWriter.endArray();
            }

            jsonWriter.endObject();
            jsonWriter.flush();

        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
Exports a map of verts to a json file (i.e. groups of a CCModel for example)
@param filePath The path to the destination file (directories must exist)
@param vertGroups The map of vert groups to export
core/src/main/java/mrtjp/projectred/lib/ModelLib.java