from dataclasses import asdict
from dacite import from_dict
from pygeojson import Point
item = Point(coordinates=[10, 20])
print(item)
item_dict = asdict(item)
print(item_dict)
from_dict(Point, item_dict)
Get error:
dacite.exceptions.UnionMatchError: can not match type "list" to any type of "coordinates" union: typing.Union[typing.Tuple[typing.Union[float, int], typing.Union[float, int]], typing.Tuple[typing.Union[float, int], typing.Union[float, int], typing.Union[float, int]]]
Get error: