Fix JSON error

This commit is contained in:
Rick Falkvinge
2013-02-16 19:24:34 +00:00
parent ab9df8db78
commit da1838d86f
@@ -92,10 +92,12 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
result.Remove(result.Length - 1, 1); // remove last comma
}
result.AppendFormat("],\"footer\":[\"id\":\"{0}\",\"amount\":\"{2:N2}\"]",
result.Append("],\"footer\":[{");
result.AppendFormat("\"id\":\"{0}\",\"amount\":\"{2:N2}\"",
"Total", balanceExpectedCents, centsTotal/100.0);
result.Append("}"); // on separate line to suppress warning
result.Append("}]}"); // on separate line to suppress warning
return result.ToString();
}