How can I have a generic JSON as an input
"params": {
"varA": {
"x": "2",
"version": 4
},
"y": [{
"p": 228.0,
"q": "abcd"
}]
}
If I define y: List[Json] I get:
"msg": "JSON object must be str, bytes or bytearray",
HTTP/1.1" 422 Unprocessable Entity
or y: List[str] or y: str
HTTP/1.1" 400 Bad Request
Is it possible to have a generic JSON List as an input instead of having to define a hard-coded Pydantic BaseModel?
y: List[dict] or y: List[typing.Any]?
@phy25 - Thanks
Thanks for the help here @phy25 ! :cake: :bowing_man:
And thanks @alivcor for reporting back and closing the issue :+1:
Most helpful comment
y: List[dict]ory: List[typing.Any]?