72 | | Keys of dictionaries/maps are restricted to strings only. |
73 | | To work around this restriction, pyson recognises from your specified type (eg {{{Dict[MyObject, str]}}}) whether the key is an object. In that case, the string key in the json dict is assumed to contain a string that can be parsed as json. The string is thus parsed as json object, and then further parsed as MyObject as usual. |
| 72 | In JSON, keys of dictionaries/maps are restricted to strings. In Python however, dicts usually contain general objects as keys. |
| 73 | |
| 74 | To work around this JSON restriction, pyson recognises from your specified type (eg {{{Dict[MyObject, str]}}}) whether the key is an object. In that case, a conversion is done between the python object (MyObject) and a json string, recursively using the standard pyson parse and toJson functions. |