SearchClient doesn't return XhtmlString values

Vote:
 

Hi,
I am strugling to understand how to obtain XhtmlString values of custom documents indexed in the Find index.

I have tagged both find 13.4.x used in our CMS11 project and 15.0.x used in the upgrade to CMS12 project.

Objects that create documents have XhtmlString properties and in both versions I can see that value under asAnnonymous of the property in question has values

If I would to retrieve documents with 

SearchClient.Get<MyObject>(DocumentId.Create("id_value_of_the_document")

I would either get empty string for the XhtmlString property in the find 13.4.x 

or

complex object with array of empty fragments in the find 15.0.x for the same XhtmlString property

Moreover in cms 12 version I tried to replace Newtonsoft.Json with System.Text.Json.Serialization namespace. I even changed XhtmlString to string type only to find that SearchClient still uses Newtonsoft under the hood because it complained on unexpected value on deserialization.

I think I remember that this was a problem before but I cannot remember if it was fixed or not. Is there some preferred way of retriving the value as html string?

#301082
May 02, 2023 19:35
* 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.