upvote
I'm not sure if I'm missing something, but isn't this functionality just moved into jsontext? https://pkg.go.dev/encoding/json/jsontext#Value.Indent

  v := jsontext.Value(b)
  v.Indent()
  fmt.Println(string(v))
reply

    func WithIndent(indent string) Options
https://pkg.go.dev/encoding/json/jsontext#WithIndent
reply

    json.Marshal(v, jsontext.WithIndent("  "))

?
reply
[flagged]
reply