You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pyGeoride/georideapilib/objects/JsonMgtMetaClass.py

13 lines
360 B

"""
Georide objects implementation
@author Matthieu DUVAL <matthieu@duval-dev.fr>
"""
import time
import logging
_LOGGER = logging.getLogger(__name__)
class JsonMgtMetaClass(type):
@staticmethod
def json_field_protect(json, field_name, default_value = None):
return json[field_name] if field_name in json.keys() else default_value