Mongocxx: How to find the size of an element in a document

Hi Everyone,

I have a requirement to find the individual sizes of each element inside a bsoncxx::document.
I referenced the documentation for bsoncxx::document::element which mentions a function length(), but it returns the length of the entire document of which the element is a part of.

Is there any way to extract the size of the individual elements?
Thanks in advance for any suggestions or inputs. :slightly_smiling_face:

Best Regards,
Nikhil John