alexiusacademia / electron-db

Electron module that acts as database management and uses flat file database (json file) to store tables.
MIT License
87 stars 24 forks source link

Broken Json issue #43

Closed LordRampantHump closed 6 months ago

LordRampantHump commented 3 years ago

sometimes i get this broken json issue normally if two workers try write at the same time i guess:

{ "accounts": [ { "uuid": "7q9cMDq1ax9i2iEkKenKtf", "firstName": "Gene", "lastName": "West", "gender": "male", "email": "Gene_West19@gmail.com", "password": "JYoETNE7SjdkIyO", "avatarSet": false, "passwordChanged": false, "listening": false, "id": 1625479565120 } ] <------ extra square bracket } ] }

is there any function to repair the json should this issue happen for any reason

alexiusacademia commented 3 years ago

Actually, the extra square bracket you're pointing at is the correct placement of that bracket, that's after the object account.