You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being able to set the JsonSerializerSettings come time to deserialize a JObject in a Hit object would be great.
I found the place the settings need to go in the ElasticQueryTranslator class. The JObject.ToObject method can receive a custom JSonSerializer. Here’s the quick fix we put in place:
privateFunc<Hit,Object>DefaultItemProjector{get{return hit =>hit._source.SelectToken(Mapping.GetDocumentMappingPrefix(sourceType)??"").ToObject(sourceType,Newtonsoft.Json.JsonSerializer.Create(newDell.ComplexConfig.Formatting.V1.CcsSerializerSettings()));}}
I’m guessing that passing the JsonSerializerSettings to the ElasticContext constructor and letting them trickle down would be the way to go.
Hi,
First off, GREAT WORK!!!
Being able to set the JsonSerializerSettings come time to deserialize a JObject in a Hit object would be great.
I found the place the settings need to go in the ElasticQueryTranslator class. The JObject.ToObject method can receive a custom JSonSerializer. Here’s the quick fix we put in place:
I’m guessing that passing the JsonSerializerSettings to the ElasticContext constructor and letting them trickle down would be the way to go.
Any way for us to contribute?
Thanks,
Rene