MrPigss / BetterJSONStorage

Better JSONStorage for tinyDB
https://pypi.org/project/BetterJSONStorage/
MIT License
33 stars 4 forks source link

is there any way to read the generated json file as a human being? #10

Open Zirpon opened 4 months ago

Zirpon commented 4 months ago

any tools or client? like Redis desktop manager

MrPigss commented 4 months ago

Everything is compressed using BLOSC2 this is not a human readable format. Luckily the compressed data is plain JSON. Just decompressing the file results in human readable JSON output.

from blosc2 import decompress

with open("some_db_file", "rb") as f:
    json_output = decompress(f.read())

# Do something with the json ...
# print, writing to file, ....