Replies: 1 comment
-
I don't think so. I mean you could try and make a reasonable guess. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a requirement where I need to create a batch of JSON entries and flush them to disk if the next element would cause it to reach above a certain size threshold. The size() is not good enough as my arrays could have nested JSON values of varying types (string, int, boolean etc.). Is there any way to compute the physical size of the JSON string that would be produced once we serialize it without first having to create the string first? I am trying to save some copying and memory.
Beta Was this translation helpful? Give feedback.
All reactions