The problem is that you are trying to parse invalid JSON:
library(jsonlite) txt <- '{"data":[{"id":2, "value":"I want to \\"post\\" a picture\\video"}]}' validate(txt)
The problem is with the picture\\video , because \v not a valid JSON escape sequence, even if it is a valid escape sequence in R and some other languages. Perhaps you mean:
library(jsonlite) txt <- '{"data":[{"id":2, "value":"I want to \\"post\\" a picture\\/video"}]}' validate(txt) fromJSON(txt)
In any case, the problem is the JSON data source, which generates invalid JSON. If this data really comes from Facebook, you have found an error in their API. But, most likely, you will not return it correctly.
source share