mtasa-resources icon indicating copy to clipboard operation
mtasa-resources copied to clipboard

Remove legacy json lib

Open 4O4 opened this issue 3 years ago • 0 comments

Last modifications made to json.js lib during webmap upgrade ([web]/ajax/json.js) broke other resources. This lib however is no longer needed as there have been native JSON functions in Javascript for ages already.

This PR reverts a workaround previously introduced in #358, removes the old lib and replaces it with native JSON functions.

This also involved a slight refactoring. A bit of more modern code was introduced (classes, startsWith). I'm assuming we don't care about ancient browsers anymore and ES2015 is a safe target for any new JS code.

Closes #379 #358

4O4 avatar Apr 07 '22 10:04 4O4