▲ | phoenixhaber 3 days ago | |||||||
I will say this and I feel it's true. Dealing with JSON in Go is a pain. You should be able to write json and not have to care about the marshalling and the unmarshalling. It's the way that serde rust behaves and more or less every other language I've had to deal with and it makes managing this behavior when there's multiple writers complicated. | ||||||||
▲ | dmoy 3 days ago | parent | next [-] | |||||||
> serde rust That does look a lot cleaner. I was just grumbling about this in golang yesterday (yaml, not json, but effectively the same problem). | ||||||||
| ||||||||
▲ | romantomjak 3 days ago | parent | prev [-] | |||||||
Are you referring to the json macro that allows variable interpolation? Doing that will void type safety. Might be useful in dynamic languages like Python but I wouldn’t want to trade type safety for some syntactic sugar in Go |