FormatJson::parse( TRY_FIXING ) - remove trailing commas
authorYuri Astrakhan <yurik@wikimedia.org>
Sat, 27 Sep 2014 10:20:36 +0000 (06:20 -0400)
committerYuri Astrakhan <yurik@wikimedia.org>
Sat, 27 Sep 2014 10:20:36 +0000 (06:20 -0400)
commit289d3e4f0000503fac5326e986f27e0b1d924c7f
tree41ffff05a705981f2b43a695131e35209c8a8589
parent9282ed3eeebaf238a6024e186a1fc5a6dc090849
FormatJson::parse( TRY_FIXING ) - remove trailing commas

Removes trailing commas from json text when parsing
Solves very common cases like [1,2,3,]

Resulting status will be set to OK but not Good to warn caller

Change-Id: Ic0eb0a711da3ae578d6bb58d7474279d6845a4a7
includes/json/FormatJson.php
languages/i18n/en.json
languages/i18n/qqq.json
tests/phpunit/includes/json/FormatJsonTest.php