Hello The encoding/json package escapes 0xA (line feed), 0xD (carriage return) and 0x9 (horizontal tab) using the escape character '\'. However, when it comes to 0x8 (backspace) and 0xc (form feed), it uses the Unicode escape sequence staring with '\uXXXX'.
Reproducer: https://play.golang.org/p/jihv9sZUjvY I can't really grasp the reason behind this difference for characters < 0x20, even tho it is perfectly valid JSON, I expected to see \f and \b. Does anyone know the reason, if there is one that lead to this? Thanks -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f3c65b8c-c612-4b75-852a-fda7b246a77e%40googlegroups.com.