Closed robinoburka closed 2 years ago
The change makes type hint for data parameter of from_json() compatible with the corresponding one in json.loads().
data
from_json()
json.loads()
It makes me trouble during interactions with different libraries, but I hope it can be useful for others.
Of course, it can be solved as Cls.from_dict(json.loads(x)), but I appreciate the from_json interface.
Cls.from_dict(json.loads(x))
from_json
The change makes type hint for
data
parameter offrom_json()
compatible with the corresponding one injson.loads()
.It makes me trouble during interactions with different libraries, but I hope it can be useful for others.
Of course, it can be solved as
Cls.from_dict(json.loads(x))
, but I appreciate thefrom_json
interface.