I wish they'd left `MarshalIndent` in there though. The equivalent code is super complicated and non-obvious, so it's a pain to migrate, and it's a pain when you're banging out some quick code and want to dump some readable JSON. I suppose these days the LLMs can write the complicated version for us, of course.
Not an insult to you, its just how I feel things are going, myself inculded at times.
v := jsontext.Value(b)
v.Indent()
fmt.Println(string(v))
lolpanda•31m ago
hnlmorg•25m ago
Plus the point of the marshal interface is that it’s reusable.
leetrout•24m ago