I have a string: {"isRegion":true, "tags":?}
Where I want to join an array of strings in place of ?
, surrounded by quotes.
My current attempt doesn't quite work:
jsonStr := []byte(fmt.Sprintf(`{"isRegion":true, "tags":[%q]}, strings.Join(tags, `","`)))
The above gives the output: "tags":["prod\",\"stats"]
I instead need the quotes to persist without escaping: "tags":["prod","stats"]