In JSON created from a pydantic.BaseModel exclude Optional if not set

后端 未结 0 344
北荒
北荒 2020-12-19 02:19

I want to exclude all the Optional values that are not set when I create JSON. In this example:

from pydantic import Ba         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题