Skip to main content
Version: 0.8.0

json_encoder

json_encoder​

View source
json_encoder(
msg
)

Encoder to encode pydantic instances to json string

Parameters:

NameTypeDescriptionDefault
msgBaseModelAn instance of pydantic basemodelrequired

Returns:

TypeDescription
bytesJson string in bytes which is encoded from pydantic basemodel