Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the json ends up as a payload in a curl command, the single quotes will mess things up.
So, really, this is a curl specific issue. I looked at doing a replace for single quotes in the PrepareCurlRequest method, which would make sense. That is where it is being wrapped in single quotes, so that is where encoding any embedded single quotes is needed. But, it changes the content length which messes up that header, and in general, it seems like your design is that any encoding has already happened. So, I'm thinking maybe you want to move this up-stream to each of your encoders -- just make it a rule that single quote is encoded to avoid problems. Though, that does mean you'd have to enforce this in each style of encoder and it only actually matters when using curl. Maybe there's a call back to the request object that the curl method can made to say, "oh hey, make sure to encode any single quotes".
So, that's why I just proposed this change here instead of in your VBA-JSON repo. Just getting the ball rolling on where you think the right place is for this fix.
Thanks for all your efforts on this library. It is nicely designed and just what we were looking for!