Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

EPiServer.Commerce.FindSearchProvider: DictionaryContract

Vote:
 

Why custom IncludeTypeNameInDictionaryKeyFieldNameConvention/DictionaryConverter is needed?

It does allmost exatcly same things that EPiServer.Find.Json.IncludeTypeInNativeFieldNamesInterceptor/DictionaryConverter but in less intelligent way:

commerce dictionary converter fails to parse inner dictionaries like: "{"dictionary": { "key": {"innerKey" : "value"}}}" due to absence of following check (that is present if default dictionary converter):

 

    if (reader.TokenType == JsonToken.Null)
    {
        return null;
    }
    if (existingValue == null)
    {
        existingValue = objectType.GetConstructor(new Type[0]).Invoke(new object[0]);
    }

    

 
#85812
May 06, 2014 10:47
* 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.