graphql-python / graphql-python/graphene-sqlalchemy

Having issues with sqlalchemy_utils JSONType while reading

未關閉
#82 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
985
分支
223
PR 合併指標
30 天內沒有已合併 PR

描述

I am using : https://github.com/kvesteri/sqlalchemy-utils

just so that I dont need to worry if I using Postgres in production or sqlite in dev environment .But from looks like it, I have no issues inserting data in json column, But when I read , seems like I get back a string, Wondering how to I get a python dict or json back when I read the column ?

```
from sqlalchemy_utils import JSONType
class Test(db.Model):
__tablename__ = 'test'
id = Column(Integer, primary_key=True)
json = Column(JSONType)
```

What I see

```
"json": "{\"data\": .....

```

貢獻指南

開啟貢獻指南

研究方向

Reproduce the reported Test model with sqlalchemy_utils.JSONType and compare the value returned when reading from SQLite and PostgreSQL. Trace the serialization and deserialization path used by the Graphene-SQLAlchemy integration; done means a JSON column read through this model returns a Python dict rather than a string.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, sqlalchemy
領域
backend, database
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。