-
Notifications
You must be signed in to change notification settings - Fork 2
Description
maybe i don't use the lib correctly for this service ?
but so far all other service haven't return this kind of error.
if you don't have time to look at it can spear time next week
BatchService bs = new BatchService(false, token, true);
List<WePay.Batch.Structure.ApiCall> batch = new List<WePay.Batch.Structure.ApiCall>();
batch.Add( new WePay.Batch.Structure.ApiCall { Call = "/checkout", ReferenceId = "1" });
var request = new WePay.Batch.Request.CreateRequest { Calls = batch.ToArray(), ClientId = clientid, ClientSecret = secret };
var resultBatchList = await bs.CreateAsync(request, token, true);
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'WePay.Shared.WePayFindResponse`1[WePay.Batch.Response.IndividualCreateResponse]' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array