4 ms·
BTW double unmarshalling (and double marshalling) can be quite slow, so to speed up determining the object type you can extract the type field e.g. by using gjs
by nasretdinov 2y ago
BTW double unmarshalling (and double marshalling) can be quite slow, so to speed up determining the object type you can extract the type field e.g. by using gjson (https://github.com/tidwall/gjson https://github.com/tidwall/gjson). It can be easily 10x faster for this kind of scenario