Skip to content

Commit b816ee7

Browse files
author
Kevin Hellemun
committed
Added method in BunqModel to create model from json string. #41
1 parent 5c75112 commit b816ee7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

BunqSdk/Model/Core/BunqModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ protected static BunqResponse<T> FromJson<T>(BunqResponseRaw responseRaw)
9292
return new BunqResponse<T>(responseValue, responseRaw.Headers);
9393
}
9494

95+
public static T FromJsonString<T>(string json)
96+
{
97+
var modelValue = BunqJsonConvert.DeserializeObject<T>(json);
98+
99+
return modelValue;
100+
}
101+
95102
/// <summary>
96103
/// De-serializes a list from JSON.
97104
/// </summary>

0 commit comments

Comments
 (0)