1
Vote

Documents

description

Could not convert string to integer: Document Title. Path '[0].title', line 1, position 47.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Newtonsoft.Json.JsonReaderException: Could not convert string to integer: Document Title. Path '[0].title', line 1, position 47.

Source Error:



Line 32: response.ResponseBody = response.ResponseBody.Replace("{","{\"api\":\"\",");
Line 33: }
Line 34: Content = JsonConvert.DeserializeObject<T>(response.ResponseBody, converter);
Line 35: }
Line 36: catch (JsonSerializationException)


Source File: c:\Users\Jacob\Documents\WebSites\BaseCamp\Clonked.Basecamp\BasecampResponse.cs Line: 34

Stack Trace:



[JsonReaderException: Could not convert string to integer: Axis Schedule. Path '[0].title', line 1, position 47.]
Newtonsoft.Json.JsonReader.ReadAsInt32Internal() +846
Newtonsoft.Json.JsonTextReader.ReadAsInt32() +39
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) +228
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) +1853
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +486
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +189
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id) +1235
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id) +712
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) +238
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +740
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +1659
Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) +47
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) +193
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonConverter[] converters) +138
Newtonsoft.Json.JsonConvert.DeserializeObject(String value, JsonConverter[] converters) +118
Clonked.Basecamp.BasecampResponse`1..ctor(Api api, BasecampResponse response) in c:\Users\jacob\Documents\GitHub\WebSites\BaseCamp\Clonked.Basecamp\BasecampResponse.cs:34
Clonked.Basecamp.BasecampRequest.GetResponse(String method) in c:\Users\jacob\Documents\GitHub\WebSites\BaseCamp\Clonked.Basecamp\BasecampRequest.cs:205
Clonked.Basecamp.Api.Get(String action) in c:\Users\jacob.cordingley\Documents\GitHub\WebSites\BaseCamp\Clonked.Basecamp\Api.cs:100
Clonked.Basecamp.Managers.DocumentManager.GetForProject(Int32 projectId) in c:\Users\jacob\Documents\GitHub\WebSites\BaseCamp\Clonked.Basecamp\Managers\DocumentManager.cs:24
Clonked.Basecamp.Project.get_Documents() in c:\Users\jacob\Documents\GitHub\WebSites\BaseCamp\Clonked.Basecamp\Project.cs:119
BaseCamp_Default.GetProjects() in c:\Users\jacob.cordingley\Documents\GitHub\WebSites\WebSite_PDMTest\BaseCamp\Default.ascx.cs:38
BaseCamp_Default.ListView1_GetData() in c:\Users\jacob\Documents\GitHub\WebSites\WebSite_PDMTest\BaseCamp\Default.ascx.cs:60

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +192
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +155
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
lambda_method(Closure , MethodInfo , Object , Object[] ) +46
System.Web.UI.WebControls.ModelDataSourceView.InvokeMethod(ModelDataSourceMethod method) +207
System.Web.UI.WebControls.ModelDataSourceView.GetSelectMethodResult(DataSourceSelectArguments arguments) +74
System.Web.UI.WebControls.ModelDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +14
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
System.Web.UI.WebControls.ListView.PerformSelect() +101
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105
System.Web.UI.WebControls.ListView.CreateChildControls() +55



System.Web.UI.Control.EnsureChildControls() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237

comments

jacobcordingley wrote Feb 2, 2015 at 6:21 PM

Found the Issus

Change File DocumentStub.cs
public int Title { get; set; }
to
public string Title { get; set; }