podio / podio-dotnet

Podio .NET client
MIT License
19 stars 39 forks source link

Serialization Issue calling GetTasks #23

Closed cluedindev closed 8 years ago

cluedindev commented 8 years ago

Hi,

When calling GetTasks, I receive the following issue.

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. Module "PodioAPI.Services.TaskService", line 423, col 0, in GetTasks System.Collections.Generic.List1[PodioAPI.Models.Task] GetTasks(System.Nullable1[System.Int32], System.Nullable1[System.Boolean], System.Nullable1[System.Int32], System.String, System.Nullable1[System.Int32], System.String, System.Nullable1[System... Module "PodioAPI.Podio", line 200, col 0, in Get T Get[T](System.String, System.Collections.Generic.Dictionary`2[System.String,System.String], System.Object) Module "PodioAPI.Podio", line 8453, col 0, in Request T Request[T](PodioAPI.RequestMethod, System.String, System.Object, System.Object) Module "System.Dynamic.UpdateDelegates", line 277, col 0, in UpdateAndExecute2 TRet UpdateAndExecute2[T0,T1,TRet](System.Runtime.CompilerServices.CallSite, T0, T1) Module "Newtonsoft.Json.JsonConvert", line 11, col 0, in DeserializeObject T DeserializeObject[T](System.String, Newtonsoft.Json.JsonConverter[]) Module "Newtonsoft.Json.JsonConvert", line 54, col 0, in DeserializeObject System.Object DeserializeObject(System.String, System.Type, Newtonsoft.Json.JsonSerializerSettings) Module "Newtonsoft.Json.JsonSerializer", line 83, col 0, in DeserializeInternal System.Object DeserializeInternal(Newtonsoft.Json.JsonReader, System.Type) Module "Newtonsoft.Json.Serialization.JsonSerializerInternalReader", line 219, col 0, in Deserialize System.Object Deserialize(Newtonsoft.Json.JsonReader, System.Type, Boolean) Module "Newtonsoft.Json.Serialization.JsonSerializerInternalReader", line 73, col 0, in ReadForType Boolean ReadForType(Newtonsoft.Json.JsonReader, Newtonsoft.Json.Serialization.JsonContract, Boolean) Module "Newtonsoft.Json.JsonReader", line 0, col 0, in ReadAndMoveToContent Boolean ReadAndMoveToContent() Module "Newtonsoft.Json.JsonTextReader", line 82, col 0, in Read Boolean Read() Module "Newtonsoft.Json.JsonTextReader", line 0, col 0, in ParseValue Boolean ParseValue()

AjmalVh commented 8 years ago

Hi @cluedindev

For me it is working perfect (see my code in the screenshot). Which all parameters are you using with GetTasks? 2016-07-04_13-10-06

cluedindev commented 8 years ago

Hi!

I am using

podio.TaskService.GetTasks(appId: application.AppId)

[CluedIn]http://cluedin.io

Tim / Chief Clue Officer tiw@cluedin.iomailto:tiw@cluedin.io / +45 53 84 15 16

CluedIn +(45) 65 71 14 04 https://www.cluedin.nhttp://cluedin.ioet

On 4 Jul 2016, at 9:44 am, Ajmal vh notifications@github.com<mailto:notifications@github.com> wrote:

Hi @cluedindevhttps://github.com/cluedindev

For me it is working perfect (see my code in the screenshot). Which all parameters are you using with GetTasks? [2016-07-04_13-10-06]https://cloud.githubusercontent.com/assets/1432316/16553906/230ef1ce-41e9-11e6-822a-edcd9415dcc1.jpg

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/podio/podio-dotnet/issues/23#issuecomment-230226096, or mute the threadhttps://github.com/notifications/unsubscribe/AIe_tE5Rp6cS9PReZlq6d2aUCJAJUDmLks5qSLnKgaJpZM4JD1iT.

AjmalVh commented 8 years ago

Filtering based on app is also working here. 2016-07-04_14-07-02

cluedindev commented 8 years ago

Thanks Ajmal.

I will investigate a bit more into this as when I run this against my Podio accounts data it works fine, but for some other companies data it gets this error.

Just so you know, I have updated to NewtonSoft 8.0.3 (not that this seems to make a difference in it working or not).

I will get back when I have more info!

[CluedIn]http://cluedin.io

Tim / Chief Clue Officer tiw@cluedin.iomailto:tiw@cluedin.io / +45 53 84 15 16

CluedIn +(45) 65 71 14 04 https://www.cluedin.nhttp://cluedin.ioet

On 4 Jul 2016, at 11:59 am, Ajmal vh notifications@github.com<mailto:notifications@github.com> wrote:

Closed #23https://github.com/podio/podio-dotnet/issues/23.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/podio/podio-dotnet/issues/23#event-711848683, or mute the threadhttps://github.com/notifications/unsubscribe/AIe_tJAhJu7Weibf1MdgsJ6TxNTTen7nks5qSNlwgaJpZM4JD1iT.