psqlpy-python / psqlpy

Asynchronous Python PostgreSQL driver written in Rust
https://psqlpy-python.github.io/
MIT License
211 stars 3 forks source link

PyJSONB/PyJSON can't handle jsons with nested lists #82

Closed vonsteer closed 1 week ago

vonsteer commented 1 week ago

psqlpy-v0.7.8 The following code raises: psqlpy.exceptions.PyToRustValueMappingError: Can't convert value from python to rust type: Your value in dict isn't supported by JSON

from psqlpy.extra_types import PyJSON

PyJSON({"data": [{"hello":"there"}]})
chandr-andr commented 1 week ago

Hello! Thank you very much for your issue. I'm looking into it right now.

chandr-andr commented 1 week ago

@vonsteer I've made a new PR with a fix and a better solution. As soon as all check complete, I'm gonna create new release and you can test that problem is fixed. https://github.com/psqlpy-python/psqlpy/pull/83

chandr-andr commented 1 week ago

@vonsteer Please check the new release https://github.com/psqlpy-python/psqlpy/releases/tag/0.7.9

vonsteer commented 1 week ago

Just tested, works as desired! Thanks @chandr-andr for the really quick and good fix!