Description
The StringBuilders.escapeJson function currently uses the string builder's insert method to add elements to an existing builder for the purposes of escaping special characters. Unfortunately, this leads to a loop that regularly expands the builder capacity, causing issues at scale.
A better approach would do a first run through to compute the total space required for the addition and then fill that space using the current method.
Attachments
Issue Links
- links to