objSize
Returns the number of bytes encodeObject writes for the given object.
The result must be exact and must match what encodeObject writes.
For variable-length data such as strings, arrays and nested objects, this walks the whole structure. The writer calls it once per logged value, in addition to encodeObject.
Return
The number of bytes required to encode this object
Parameters
obj
The object to calculate the encoded size for