[R] backslash escape characters in JSON strings

dabd dario.rehman at gmail.com
Wed Jun 30 12:16:59 CEST 2010


Hi,

I am trying to consume a web service that returns a JSON string, however,
when I run
> fromJSON(s)
Error: '\/' is an unrecognized escape in character string starting "http:\/"

because the string s contains a single backslash, which is the JSON escape
character, but R expects 2 backslashes, I think.

Is there anyway to preprocess the JSON string returned from the web service
so it escapes it according to R escaping rules?

Thanks.
-- 
View this message in context: http://r.789695.n4.nabble.com/backslash-escape-characters-in-JSON-strings-tp2272698p2272698.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list