From 5d8fab4e7af2000bdefca79e9a48f4a11630f789 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Sun, 2 Mar 2014 13:26:38 +0100 Subject: [PATCH] fix bad JSON from uptimerobot (oh gosh) --- UptimeSharp/UptimeClient.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UptimeSharp/UptimeClient.cs b/UptimeSharp/UptimeClient.cs index 6508626..41622c1 100644 --- a/UptimeSharp/UptimeClient.cs +++ b/UptimeSharp/UptimeClient.cs @@ -173,6 +173,12 @@ namespace UptimeSharp string responseString = await response.Content.ReadAsStringAsync(); T parsedResponse; + // fix buggy response by uptimerobot óÒ + if (!String.IsNullOrEmpty(responseString)) + { + responseString = responseString.Replace("}{", "},{"); + } + // cache response lastResponseData = responseString;