When using StatsBar::stat via the API, the returned JSON string is invalid, throwing the following error:
JSON_ERROR_SYNTAX
An example of the string returned:
Code:
{
"cpanelresult":
{
"data":
[{
"percent10":0,
"normalized":1,
"percent5":0,
"percent20":0,
"item":"Disk Usage",
"zeroisunlimited":1,
"name":"diskusage",
"langkey":"INDXDiskUsage",
"_maxed":1,
"_count":579.99,
"units":"MB",
"module":"Quota",
"_max":unlimited,
"percent":0,
"count":579.99,
"max":"unlimited MB",
"id":"diskusage"
}],
"event":
{
"result":1
},
"module":"StatsBar",
"apiversion":2,
"func":"stat"
}
}
The error comes from this part:
Which should be: