Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

How to debug Sling JSON Exporter issues?

Avatar

Level 2

Encountered a weird behaviour in one of the environment.
I have a page /content/sites/na/us/en/samplepage when I have browsed this /content/sites/na/us/en/samplepage.infinity.json  in one of the environment I am able to get JSON results where as in other environment I am getting plain html. Suprisingly both environment have the same code package deployed but having the differences in serving the content.

*there is no dispatcher involved in both environments, So where do I start to figure out the root cause !!!

Thanks in advance...

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi @donquixote_dofl,

1. Check Request Accept Header
  • The .infinity.json suffix should return JSON regardless, but if there’s a difference in the Accept HTTP header (e.g., one environment treats it differently), it could affect Sling’s response type negotiation.

  • Use a tool like Postman or curl to compare request headers exactly between environments.

curl -I https://yourserver/content/sites/na/us/en/samplepage.infinity.json
2. Verify Sling Resource Resolution and Selectors
  • Confirm the .infinity.json selector is correctly recognized.

  • Make sure both environments have the same Sling Resource Types and Servlet Mappings.

  • If the resource type or script rendering JSON is missing or overridden in one environment, it might fallback to HTML.


Santosh Sai

AEM BlogsLinkedIn


Avatar

Level 2

In both environments have the same Sling Resource Types and Servlet Mappings, and the selectors also correctly recognized.

Avatar

Community Advisor

Did you check error logs? in both environments?

 

Review the AEM error logs (error.log) in both environments for any exceptions or warnings when accessing .infinity.json.
Look for issues related to Sling Models, resource resolution, or servlet handling.

 

Check Sling Mappings and Resource Resolution
Verify if there are any differences in the Sling Resource Resolver configurations between the two environments.
Go to /system/console/configMgr and check the Apache Sling Resource Resolver Factory configuration.
Ensure that the JSON extension is not being overridden or mapped differently in one environment.

Avatar

Level 2

Sling Resource Resolver configurations between the two environments are same no difference.