Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/WebHelpers.bas
Original file line number Diff line number Diff line change
Expand Up @@ -2539,11 +2539,15 @@ Private Function json_Encode(ByVal json_Text As Variant) As String
End If

' From spec, ", \, and control characters must be escaped (solidus is optional)

' To avoid problems with quoting the payload on the command line in single quotes, need to escape ' also

Select Case json_AscCode
Case 34
' " -> 34 -> \"
json_Char = "\"""
Case 39
' ' -> 39 -> \u0027 (decimal 39 is 27 in hex)
json_Char = "\u0027"
Case 92
' \ -> 92 -> \\
json_Char = "\\"
Expand Down