How do you parse your request body? If you parse your request body like this:
var result ComputeConfig
err = json.Unmarshal(reqBody, &result)
if err != nil {
fmt.Println("Error unmarshaling JSON:", err)
} else {
fmt.Println("Parsed JSON successfully:", result)
}
You don't need to convert the Config
to JSONB using ConvertMapToJSONB()
. The json Unmarshal will convert it for you.
I got it working with this.
Maybe you could provide more details about how you parse your request body.