JsonReaderException on Custom GoogleMapsProperty

Vote:
 

I get a JsonReaderException when trying to save the location in our own built GoogleMapsPropertyControl (that worked just fine on EPiServer 6).

I can open the GoogleMaps-popup and search and choose adress but it seems that there's a problem deserializing it when saving it. Problem is that the deserialization is handled automaticly and not something we do ourselves by code.

PropertyGoogleMapsLocations inherits from PropertyLongString (I've tried PropertyData as well with no success) and the property in the ModelClass looks like this:

[BackingType(typeof(PropertyGoogleMapsLocation))]
public virtual GoogleMapsLocation Point { get; set; }

    

The stack trace:

[JsonReaderException: Error reading string. Unexpected token: StartObject. Path '', line 1, position 1.]
   Newtonsoft.Json.JsonReader.ReadAsStringInternal() +606
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) +149
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +867
   Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +529
   EPiServer.UI.Edit.EditProperty.ApplyPostedValue() +334
   EPiServer.UI.Edit.EditProperty.Page_Init(Object sender, EventArgs e) +183
   System.Web.UI.Page.OnInit(EventArgs e) +102
   EPiServer.UI.ContentBaseWebForm.OnInit(EventArgs e) +16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +186
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2098

    

#66116
Feb 20, 2013 14:51
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.