JSON field is string
See original GitHub issueHaving field defined this way Column('abc', JSON)
, I have to use json.loads
to get dict:
rows = await pg.fetch(sql)
async for row in rows:
print(json.loads(row.abc))
row.abc
is string
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Is it possible to wrap json in json field like a string?
JSON-encoded stuff is just a string. If you want to embed json-in-json, then the "inner" json has to be encoded into json itself....
Read more >JSON Syntax - W3Schools
JSON data is written as name/value pairs (aka key/value pairs). A name/value pair consists of a field name (in double quotes), followed by...
Read more >Using the JSON parser to parse a JSON string into a ... - IBM
The JSON parser generates a schema, with keys included in the list of fields that are available for mapping into later nodes in...
Read more >Add JSON string in JSON body - Salesforce Stack Exchange
In "machinename", I want to add this other JSON string so that it gets stored in the text field as JSON string ({...
Read more >Non-string JSON fields - HTTPie 3.2.1 (latest) docs
Non-string JSON fields use the := separator, which allows you to embed arbitrary JSON data into the resulting JSON object. Additionally, text and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue is analogous to #45 .
This is a bug, that requires a lot more work to get working. For now you’ll just have to json decode json feilds I guess. Pr’s welcome 😉
I was premature in saying json decoding will work for you in the release notes. I misunderstood some things.