Exemplo n.º 1
0
    def from_js(self, json):
        """Documentation"""
        if isinstance(json, dict):
            json_dict = json
        else:
            json_dict = deps.loads(json)

        for key, prop in self.properties().items():
            value = json_dict[key]
            prop.from_js(value)
Exemplo n.º 2
0
 def from_js(self, value):
     return self.validate(deps.loads(value))