mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 19:26:51 +00:00
a work around for simple json support for empty root nodes
This commit is contained in:
@@ -44,8 +44,12 @@ namespace Octokit.Internal
|
||||
|
||||
if (response.ContentType != null && response.ContentType.Equals("application/json", StringComparison.Ordinal))
|
||||
{
|
||||
var json = _serializer.Deserialize<T>(response.Body);
|
||||
response.BodyAsObject = json;
|
||||
// simple json does not support the root node being empty. Will submit a pr but in the mean time....
|
||||
if (response.Body != "{}")
|
||||
{
|
||||
var json = _serializer.Deserialize<T>(response.Body);
|
||||
response.BodyAsObject = json;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user