4 ms·
Try creating a type in Go to represent arbitrary JSON.
by qaq 7y ago
Try creating a type in Go to represent arbitrary JSON.
- sacado2 7y agointerface{}
- qaq 7y agovery safe option
- kristoff_it 7y agoyou mean the interface{} or the json? :)
- dullgiulio 7y agoIt's 100% memory safe. In other languages you would use the same (some variation of Object.)
- sacado2 7y agoThere is no safer option anyway if you can be given an arbitrary JSON object in the first place.