Has anyone written a JSON serializer for this?
Seems a mistake to have hard-baked in the serialization functionality within this class, specificially to XmlSerializer, but I'll stand corrected as to any reasons why?
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.
Sign up to join this communityHas anyone written a JSON serializer for this?
Seems a mistake to have hard-baked in the serialization functionality within this class, specificially to XmlSerializer, but I'll stand corrected as to any reasons why?
The reason why the data format (in our case XML) is hardcoded, is that DD4T controls the input as well as the output of the process. The XML is intended to be consumed in a web application by the DD4T factories / providers.
If you want to publish JSON and consume it using custom application logic, you don't really need DD4T - just write a template that does this. If you just want to access the Tridion content model on the front end using Java or .NET, and you don't care about the data format in which the pages and components get published, DD4T is the framework for you.
As I understand it, DD4T is an open source project. Presumably no-one has yet felt the need for this enhancement. My suggestion would be to build it yourself, and obviously, also contact the DD4T team to see if your enhancement can benefit others by being integrated into the project