3

In Tridion Deployer extension (Java), I am able to get the Component Presentation data, but it is in compressed format as my templates are in DD4T.

Can any one help me how to decompress the Component fields data?

  • Could you tell us what you have tried, and maybe what you are trying to achieve ? – jarnohenneman Oct 13 '17 at 7:54
  • I am trying to access the component fields in the deployment extension after publishing. As we are using DD4T templates, we are getting the component data in the compressed format that I want to decompress it. – Gopal Oct 13 '17 at 9:03
  • Have a look here: github.com/dd4t/dd4t-2-java/blob/develop/dd4t-core/src/test/… You can decompress and deserialize, but bear in mind you need quite a few dependencies in your deployer. – Raimond Oct 13 '17 at 14:13
4

Simplest solution would be not to compress the JSON in your Templates, then you also wouldn't have to deal with decompression. This is done by removing the compression TBB from the Template.

Another option is to use the DD4T org.dd4t.core.util.CompressionUtils to decompress it. See https://github.com/dd4t/dd4t-2-java/blob/develop/dd4t-core/src/main/java/org/dd4t/core/util/CompressionUtils.java

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.