On Friday, May 28, 2021 at 6:26:46 PM UTC+2 [email protected] wrote: > QuoteToAscii converts non printable characters to \xd , but i literally > want the same value . > > QuoteToAscii will not produce the json compatible string or will not > escape string in true sense like > > Conversion of "abc\u001d" will be converted to "abc\x1d" which is not > compatible with json string > > > If there is no built in cooked function , > > Can you please through some pointers how to implement on own , i am not > able to figure it out ... >
See https://github.com/golang/go/blob/ccd9784edf/src/encoding/json/encode.go#L1031 as an example. Also, note that the language name is Go, not Golang. Manlio -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/2073826a-91e8-403d-918c-43d4ef3a3cben%40googlegroups.com.
