Error Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: L. Path '', line 0, position 0.
Hi, I got this error. I use one document type on 5 pages - different blogs sections. Only on one of these have error. Same error is in backoffice when I try open one of articles in that blog section. Log says:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: L. Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue() in //Src/Newtonsoft.Json/JsonTextReader.cs:line 1706
at Newtonsoft.Json.JsonTextReader.Read() in //Src/Newtonsoft.Json/JsonTextReader.cs:line 419
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) in //Src/Newtonsoft.Json/JsonReader.cs:line 1195
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 196
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) in //Src/Newtonsoft.Json/JsonSerializer.cs:line 907
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) in //Src/Newtonsoft.Json/JsonConvert.cs:line 828
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) in //Src/Newtonsoft.Json/JsonConvert.cs:line 786
at Umbraco.Web.PropertyEditors.MultipleValueEditor.ToEditor(Property property, IDataTypeService dataTypeService, String culture, String segment) in D:\a\1\s\src\Umbraco.Web\PropertyEditors\MultipleValueEditor.cs:line 38
at Umbraco.Web.Models.Mapping.ContentPropertyBasicMapper1.Map(Property property, TDestination dest, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentPropertyBasicMapper.cs:line 79
at Umbraco.Web.Models.Mapping.ContentPropertyDisplayMapper.Map(Property originalProp, ContentPropertyDisplay dest, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentPropertyDisplayMapper.cs:line 24
at Umbraco.Web.Models.Mapping.ContentPropertyMapDefinition.Map(Property source, ContentPropertyDisplay target, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentPropertyMapDefinition.cs:line 58
at Umbraco.Core.Mapping.UmbracoMapper.<>c__DisplayClass8_02.02.<Define>b__1(Object source, Object target, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 106
at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 206
at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 154
at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Action1 f) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 143
at Umbraco.Web.Editors.ContentController.MapToDisplay(IContent content) in D:\a\1\s\src\Umbraco.Web\Editors\ContentController.cs:line 2175
at Umbraco.Web.Editors.ContentController.GetById(Int32 id) in D:\a\1\s\src\Umbraco.Web\Editors\ContentController.cs:line 299
at lambdamethod(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass62.
Hi,
Maybe you changed an existing data type for a field in the document type, so if you view the content node of that document type say blog page you may get that error. Better to remove that changed field and save the document type and check if the error is gone. Then create once again the same field with a different alias name. Hop that will work.
Hi thanks for answer. Any data wasn´t change. I was thinking about delete that article too. But I am curious where is error, so if we can find it, it will not repeat error in future (I hope so...)
HI,
Were you trying to create the articles(content node) programmatically? If some wrong data is added to fields via code, there might be an error like this when viewing that node from backoffice.
Could you share any screenshot of any article and its document type to get a better idea? And could you let me know what was the last change made to that error occurred article, I mean to which field?
Error Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: L. Path '', line 0, position 0.
Hi, I got this error. I use one document type on 5 pages - different blogs sections. Only on one of these have error. Same error is in backoffice when I try open one of articles in that blog section. Log says:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: L. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() in //Src/Newtonsoft.Json/JsonTextReader.cs:line 1706 at Newtonsoft.Json.JsonTextReader.Read() in //Src/Newtonsoft.Json/JsonTextReader.cs:line 419 at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) in //Src/Newtonsoft.Json/JsonReader.cs:line 1195 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 196 at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) in //Src/Newtonsoft.Json/JsonSerializer.cs:line 907 at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) in //Src/Newtonsoft.Json/JsonConvert.cs:line 828 at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) in //Src/Newtonsoft.Json/JsonConvert.cs:line 786 at Umbraco.Web.PropertyEditors.MultipleValueEditor.ToEditor(Property property, IDataTypeService dataTypeService, String culture, String segment) in D:\a\1\s\src\Umbraco.Web\PropertyEditors\MultipleValueEditor.cs:line 38 at Umbraco.Web.Models.Mapping.ContentPropertyBasicMapper
1.Map(Property property, TDestination dest, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentPropertyBasicMapper.cs:line 79 at Umbraco.Web.Models.Mapping.ContentPropertyDisplayMapper.Map(Property originalProp, ContentPropertyDisplay dest, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentPropertyDisplayMapper.cs:line 24 at Umbraco.Web.Models.Mapping.ContentPropertyMapDefinition.Map(Property source, ContentPropertyDisplay target, MapperContext context) in D:\a\1\s\src\Umbraco.Web\Models\Mapping\ContentPropertyMapDefinition.cs:line 58 at Umbraco.Core.Mapping.UmbracoMapper.<>c__DisplayClass8_0
2.02.<Define>b__1(Object source, Object target, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 106 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 206 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 154 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Action
1 f) in D:\a\1\s\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 143 at Umbraco.Web.Editors.ContentController.MapToDisplay(IContent content) in D:\a\1\s\src\Umbraco.Web\Editors\ContentController.cs:line 2175 at Umbraco.Web.Editors.ContentController.GetById(Int32 id) in D:\a\1\s\src\Umbraco.Web\Editors\ContentController.cs:line 299 at lambdamethod(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass62.Can anyone help? Thanks
Hi, Maybe you changed an existing data type for a field in the document type, so if you view the content node of that document type say blog page you may get that error. Better to remove that changed field and save the document type and check if the error is gone. Then create once again the same field with a different alias name. Hop that will work.
Hi thanks for answer. Any data wasn´t change. I was thinking about delete that article too. But I am curious where is error, so if we can find it, it will not repeat error in future (I hope so...)
HI, Were you trying to create the articles(content node) programmatically? If some wrong data is added to fields via code, there might be an error like this when viewing that node from backoffice.
No... All of articles were created by person. But only one article gets error
Could you share any screenshot of any article and its document type to get a better idea? And could you let me know what was the last change made to that error occurred article, I mean to which field?
Hi' Tomas
Did you get the solution?
Hi Naty,
Unfortunately, no. I deleted the article and created it again. Then it worked without problems
I am facing same issue while save and publish. Can someone help on this. How can I debug or find out for which exact data its failing ?
I am using below code for save and publish.
Great thanks !
is working on a reply...