From da1838d86f8462effd94a5ddd7dc4e8bb1eea61f Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 16 Feb 2013 19:24:34 +0000 Subject: [PATCH] Fix JSON error --- Site5/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Site5/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs b/Site5/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs index ed083566..f0cdbbc4 100644 --- a/Site5/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs +++ b/Site5/Pages/v5/Ledgers/Json-OutstandingAccounts.aspx.cs @@ -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(); }