gdsclpu / OpenWorldAPI

An API that helps with getting basic information like Country, State, Districts, etc.
https://openworldapi.gdsclpu.live/
MIT License
8 stars 50 forks source link

Invalid trailing commas in India.json #65

Closed shubhansu-kr closed 2 years ago

shubhansu-kr commented 2 years ago

Describe the bug Trailing commas in india.json file, which is causing server crash on local host.

To Reproduce Steps to reproduce the behavior:

  1. Go to ./data/countries/india.json
  2. Click on '....'
  3. Scroll down to 'line 1042 and 1069'
  4. See error
shubhansu-kr commented 2 years ago

The local server crashed with the following error

SyntaxError: E:\Forks\OpenWorldAPI\data\countries\india.json: Unexpected token ] in JSON at position 22809

image

Upon checking, turned out it was simple trailing comma error.

Vyvy-vi commented 2 years ago

We should probably set up a linter github action.