public static Point deserialize(JsonElement element) {
        Position position = Position.deserialize(element);
        Direction direction = Direction.deserialize(element);

        return of(position, direction);
    }
An immutable and serializable position + direction object
helper/src/main/java/me/lucko/helper/serialize/Point.java