Skip to content

DD4T.Serialization.JSONSerializerService #35

@Shiva85

Description

@Shiva85

https://tridion.stackexchange.com/questions/17961/dxa-1-2-intermittent-issue-in-json-output
https://tridion.stackexchange.com/questions/18235/dxa-1-5-intermittent-issue-in-json-output

I am suspecting that the root cause for the issues reported in the above questions are related to the JSONSerializer fix that was put in for DD4T.

The component presentation builder from DD4T ComponentPresentationBuilder is using the following https://github.com/dd4t/DD4T.TridionTemplates/blob/develop/source/DD4T.Templates.Base/Builder/ComponentPresentationBuilder.cs

try
{
// we cannot be sure the component template uses the same serializer service as the page template
// so we will call a factory which can detect the correct service based on the content
ISerializerService serializerService = SerializerServiceFactory.FindSerializerServiceForContent(renderedContent);
cp = serializerService.Deserialize<Dynamic.ComponentPresentation>(renderedContent);
}

In the base SerializerServiceFactory, I noticed that we are using the DD4T.Serialization.JSONSerializerService (https://github.com/dd4t/DD4T.Model/blob/2.0.4-beta1/source/DD4T.Serialization/SerializerServiceFactory.cs), which is using the DD4T.Serialization.JS JSONSerializerService and does not having the concurrency issue that is fixed below

private static string defaultSerializerServerType = "DD4T.Serialization.JSONSerializerService"; // Initialization in DD4T Serialization/SerializerServiceFactory

I see a commit transaction here
ff96b15 // Fixed and commited to DD4T

I would like to get some feedback before pursuing to upgrade the DD4T.Merged manually with the fix indicated above. The fix for the above issues would be to upgrade DD4T corresponding to the version of DXA.

Also, is it recommended that we switch the NewtonSoft references from 6.0.8 to 10.0.1, for the concurrency issue? I did not see an open issue in DD4T.Model and hence opened a new issue. Let me know your feedback!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions