Closed ArneGudermann closed 1 week ago
This PR fix the Bug that only str is validated by the JsonBone.
str
Example :
testjson = JsonBone(schema={ "type": "object", "properties": { "price": {"type": "number"}, "name": {"type": "string"}, }, })
print(skel.setBoneValue("testjson",{"name" : "Eggs", "price" : "invalid"})) print(skel["testjson"])
True {'name': 'Eggs', 'price': 'invalid'}
print(skel.setBoneValue("testjson",json.dumps({"name" : "Eggs", "price" : "invalid"}))) print(skel["testjson"])
False {'name': 'Eggs', 'price': 1}
This PR fix the Bug that only
str
is validated by the JsonBone.Example :