public static Vector4f deserialize4f(JsonElement element) {
        return new Vector4f(
                element.getAsJsonObject().get("x").getAsFloat(),
                element.getAsJsonObject().get("y").getAsFloat(),
                element.getAsJsonObject().get("z").getAsFloat(),
                element.getAsJsonObject().get("w").getAsFloat()
        );
    }
Utility for serializing and deserializing flowpowered Vector instances
helper/src/main/java/me/lucko/helper/serialize/VectorSerializers.java