mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
10 lines
214 B
Python
10 lines
214 B
Python
import enum
|
|
import json
|
|
|
|
|
|
class EnumAsStrEncoder(json.JSONEncoder):
|
|
def default(self, obj):
|
|
if isinstance(obj, enum.Enum):
|
|
return obj.name
|
|
return json.JSONEncoder.default(self, obj)
|