79274954

Date: 2024-12-12 11:41:27
Score: 2.5
Natty:
Report link

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.

enter image description here

Maybe you could provide more details about how you parse your request body.

Reasons:
  • Blacklisted phrase (1): How do you
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): How do you
  • Low reputation (1):
Posted by: Farol R