Try our conversational search powered by Generative AI!

Error on xhtlm property when doing a basic search


I'm implementing EPiServer Find on a CMS 7 site just upgraded from CMS 6 R2 and when using UnifiedSearch everything works fine but if I try to specify a type in the search I get the following error:

Exception Details: Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'EPiServer.Core.XhtmlString' because the type requires a JSON string value to deserialize correctly.
To fix this error either change the JSON to a JSON string value or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'hits.hits[0]._source.MainBody.IsEmpty$$bool', line 1, position 834.


var result = client.UnifiedSearchFor(Query).GetResult();

Do not work:

var result = client.Search<PageData>().For(Query).GetResult();

Any Suggestions
Aug 21, 2013 19:04


try this:



You can find more info here:

Aug 21, 2013 20:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.