If it has a JSON body, are you using encoding/json to parse / decode it? That will handle the unescaping for you.
On Sat, Dec 24, 2016 at 4:54 PM JohnGB <jgbeck...@gmail.com> wrote: > I have an application where I am processing a HTTP request with a JSON > body. However, the JSON in the body has been unicode escaped, so instead > of `wasn't`, I get `wasn\u0027t`. > > What is the simplest way to unescape this text back to utf8 encoded text. > i.e. convert `wasn\u0027t` to `wasn't`. Please note that I'm only using > this as an example, but I'd like all unicode escaped characters to be > converted to their utf8 equivalents. > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.