lexical error: invalid char in json text

i am getting an error and i cannot understand it:

Error: lexical error: invalid char in json text.
                                       data
                     (right here) ------^

tbh i requested this through 'fiverr' but the seller has not been forthcoming with a solution, any help is appreciated:

Hi, welcome!

We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

Hi @ruigol! Welcome!

Speaking generally, that error means that something jsonlite is trying to parse as JSON is not, in fact, valid JSON. The little arrow points to the place where jsonlite realized that something was wrong.

The reasons you can get this error are wide and varied! Possibly your JSON is malformed for some reason, or possibly the code has a mistake and is trying to parse something that was never JSON to begin with. Maybe that’s enough to point you in the right direction? If not, I’d advise following @andresrcs’s excellent advice for how to supply enough information for people here to be able to give more specific help :smile:.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.