Hello. CAn someone suggest me a solution for this.
I guess I am missing something very silly.
I have a postgresql table with a json field which is perfectly represented in my django model.
But I can’t find a way to represent it in my ninja schema.
class orgin(Schema):
orgname: str
orgaddr: str
orgdetails: json #does not work.
Show properly your full code in code blocks. Where are your imports?
All right here’s the entire code.
from ninja import Schema
class orgin(Schema):
orgname: str
orgaddr: str
orgdetails: json
So the last field represents a json field which is correctly mapped to the django model.
Am I missing any imports here?
Regards.
What is the output of orgdetails.json()
?