[python] ValueError: Unsupported type: 'collections.OrderedDict'
Closed this issue · 2 comments
rijenkii commented
Even though OrderedDict
is a subclass of dict
, passing it to jsonschema_rs
functions raises an exception:
>>> import collections
>>> import jsonschema_rs
>>> jsonschema_rs.is_valid({"type": "object"}, collections.OrderedDict({}))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: Unsupported type: 'collections.OrderedDict'
How hard would it be to support subclasses of dict
?
flbraun commented
Hi @rijenkii !
I'm also encountering this issue and would like to see jsonschema_rs
handle this. I absolutely love the lib's performance, but this issue unfortunately is a show stopper for adoption in my projects.
I opened a PR to add compatibility for dict
subclasses.
Stranger6667 commented
Released in 0.17.3
🎉