omdbapi / OMDb-API

The Open Movie Database Bug Tracking
416 stars 20 forks source link

Bad JSON response when number parsing failure. #301

Open bobyuancn opened 10 months ago

bobyuancn commented 10 months ago

Request URL: http://www.omdbapi.com/?i=tt3896198a&apikey=(your_api_key) the Movie ID is: tt3896198 but I intentionally append "a" as suffix, it will cause number parsing error. The response is a bad JSON because of the double quote:

{"Response":"False","Error":"Conversion from string "3896198a" to type 'Double' is not valid."}

I suggest to use single quote for "3896198a", or escape the double quote to avoid JSON error.