fix to json, remove trailing comma, fix ie8 error