verbs.utils.cache_from_json#
- cache_from_json(cache_json: List) Tuple[int, int, List[Tuple[bytes, Tuple[bytes, int, bytes, bytes]]], List[Tuple[bytes, bytes, bytes]]] [source]#
Convert a cache JSON data into env compatible format
Converts a JSON compatible data structure representing a cache back into the format required for use when initialising a simulation environment.
Examples
cache =verbs.utils.cache_from_json(cache_json) env = verbs.envs.EmptyEnv(101, cache)
- Parameters:
cache_json (
list
) – Cache JSON data structure.- Returns:
verbs.types.Cache
– Cache converted to format for initialisation of a simulation environment.