Skip to content

Commit

Permalink
Added method in BunqModel to create model from json string. #41
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Nov 13, 2017
1 parent 5c75112 commit b816ee7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions BunqSdk/Model/Core/BunqModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ protected static BunqResponse<T> FromJson<T>(BunqResponseRaw responseRaw)
return new BunqResponse<T>(responseValue, responseRaw.Headers);
}

public static T FromJsonString<T>(string json)
{
var modelValue = BunqJsonConvert.DeserializeObject<T>(json);

return modelValue;
}

/// <summary>
/// De-serializes a list from JSON.
/// </summary>
Expand Down

0 comments on commit b816ee7

Please sign in to comment.