VBA-tools / VBA-JSON

JSON conversion and parsing for VBA
MIT License
1.76k stars 568 forks source link

ability to escape a single quote/apostrophe in dictionary value? #146

Closed ShiftyF9 closed 4 years ago

ShiftyF9 commented 4 years ago

The single quote character isn't being escaped in a dict value, which is causing issues when I attempt up upload the JSON into an SQL table. Any way to easily change that? Maybe in the json_ParseString function, the first Case?

ShiftyF9 commented 4 years ago

Nevermind, fixed it myself. In case anyone has the same issue, in the resulting JSON, simply replace the single quote/apostrophe with two instances of the same: JsonText = Replace(JsonText, "'", "''")

ShiftyF9 commented 4 years ago

BTW, thanks for this awesome tool!!