jaymedavis/stripe.net — Issue #7: compile for .net 2.0
Author: bunasa
Created: 2012-01-24 20:00:53+00:00
State: open

because of my hosting company not having .net 4.0 I had to recompile your api to .net 2.0.
I had to use the JSon library for 2.0 but also had to make a change to the Mapper class.

In MapCollectionFromJson I changed it to the following so .net 2.0 can compile it without issues:

public static List MapCollectionFromJson(string json, string token = "data")
{
var jObject = JObject.Parse(json);
List retList = new List();

JToken tempToken = jObject.SelectToken(token);

foreach (var tempObj in tempToken)
{
retList.Add(Mapper.MapFromJson(tempObj.ToString()));
}

return retList;
}

All this is FYI in case you feel like adding those changes in.