{“toDb”:“BEGIN let rs1 resultset := (\u0002); let rs2 resultset := select c2 from t1 where RLIKE(c1,‘\d+’); END;“}
When I decode this json string into a struct, it will remove the escaping characters. That’s not what I expect. So how can I avoid this behavior? Here is the example code link: Go Playground - The Go Programming Language
Escaped characters are properly represented in the deserialized data.
If you want to represent the string \u0002 or \\d rather than the byte 0x02 or the string \d, you need to add additional escapes in the JSON. \\u0002 and \\\\d.