APIencoderjson_encoderVersion: 0.6.0On this pagejson_encoderfastkafka.encoder.json_encoder​json_encoder​def json_encoder(msg: pydantic.main.BaseModel) -> bytesEncoder to encode pydantic instances to json stringParameters:msg: An instance of pydantic basemodelReturns:Json string in bytes which is encoded from pydantic basemodel