class ForcedRoot implements JsonObjectConvertible, Comparable<ForcedRoot> {

    public static @NotNull ForcedRoot fromJson(final @NotNull JsonObject json) {
        final JsonKeys keys = keys();
        final ForcedRoot forcedRoot = new ForcedRoot();
        if (json.containsKey(keys.path())) {
            forcedRoot.setPath(json.getString(keys.path()));
        }
        if (json.containsKey(keys.primaryType())) {
            forcedRoot.setPrimaryType(json.getString(keys.primaryType()));
        }
        optArray(json, keys.mixinTypes()).ifPresent(jsonArray -> {
            forcedRoot.setMixinTypes(mapArrayOfStrings(jsonArray, Function.identity()));
        });
        return forcedRoot;
    }

}