strip off trailing commas

This commit is contained in:
s1341 2013-11-19 18:16:59 +02:00
parent fb69e6b0a3
commit 7550be0921

View file

@ -55,6 +55,8 @@ $(document).ready(function () {
function isJSONClean(data){
var cleanSettings = JSON.minify(data);
// this is a bit naive. In theory some key/value might contain the sequences ',]' or ',}'
cleanSettings = cleanSettings.replace(",]","]").replace(",}","}");
try{
var response = jQuery.parseJSON(cleanSettings);
}