This class parses the DeviceAtlas JSON data file and represents the
data.
Copyright:
Copyright (c) Afilias Technologies Limited 2021. All Rights Reserved.
Author:
Afilias Technologies Limited
|
__init__(self,
json,
config)
Load the JSON tree into a dictionary. |
|
|
|
set_config(self,
config)
Applies a new configuration object to the tree instance. |
|
|
|
|
|
data_version(self)
Returns the device data (JSON file) version. |
|
|
|
|
|
put_properties(self,
user_agent,
stock_user_agents,
client_side_properties,
properties)
Get properties from tree walk, User-Agent and client side and put
them in the Tree properties. |
|
|
|
put_tree_walk_properties(self,
user_agent,
stock_user_agents,
properties)
Get properties from tree walk and User-Agent and put them in the Tree
properties. |
|
|
|
property_name_by_id(self,
property_id) |
|
|
|
property_value_by_id(self,
value_id) |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
MIN_JSON_VERSION = 0.7
|
|
MAP_INITIAL_CAPACITY = 100
|
|
KEY_DEVICE_ID = u' iid '
|
|
KEY_META = u' $ '
|
|
KEY_META_VERSION = u' Ver '
|
|
KEY_GOTO = u' g '
|
|
KEY_META_REVISION = u' Rev '
|
|
KEY_META_TIMESTAMP = u' Utc '
|
|
KEY_PROPERTY_NAMES = u' p '
|
|
KEY_VALUES = u' v '
|
|
KEY_REGEX = u' r '
|
|
KEY_COMPILED_REGEX = u' creg '
|
|
KEY_HEADERS = u' h '
|
|
KEY_UA_STOCK_HEADERS = u' sl '
|
|
KEY_MAIN = u' t '
|
|
KEY_DATA = u' d '
|
|
EXCLUSION_KEY_DATA = u' s '
|
|
KEY_CHILDREN = u' c '
|
|
KEY_MASKED = u' m '
|
|
tree = None
hash(x)
|
|
data_revision = None
hash(x)
|
|
stock_ua_headers = [ ]
|