3 ms·
And, if you hate strong typing, there's always map[string]any.
by duskwuff 2y ago
And, if you hate strong typing, there's always map[string]any.
- dwattttt 2y agoReally, the mismatch is at the JSON side; arbitrary JSON is the opposite of strongly typed. How a language lets you handle the (easily fallible) process of "JSON -> arbitrarily typed -> the actual type you wanted" is what matters.
- throwaway2037 2y ago> arbitrary JSON is the opposite of strongly typed On the surface, I agree. In practice, many big enterprise systems use highly dynamic JSON payloads where new fields are added and changed all the time.