0

Lately we've been receiving faulty file open requests from Google Drive with an invalid JSON state parameter. An example of such a parameter is:

"{\"action\":\"open\",\"ids\":[\"01234567ABCDEFG\"],}"

There is an extra comma (,) at the end of the object and this causes our JSON parser to throw an exception. We could, of course, read the JSON first and remove the extra comma, but this is obviously not the ideal solution.

1 Answers1

0

Based on this question asked back in '13, its stated that its a valid syntax that helps appending additional properties easier.

Change has to happen in your JSON parser implementation to handle these cases. There's usually a utility class to handle JSON properly in different languages.

Community
  • 1
  • 1
adjuremods
  • 2,938
  • 2
  • 12
  • 17