Link checker checks anchor links in servlet response & rewrites only in following scenarios.
If "a:href" present in the Day CQ Link Checker Transformer configuration. if your requirement is to
disable link checker across the site irrespective of content type(application/json, text/html etc.) then removing "a:href" from this configuration will resolve your issue.
disable link checker only for json response then do not remove "a:href" from here & let it be as it is so that link checker applies to sightly html & other configured content type. check below solution to disable link checker only for json response.
Disable link checker only for JSON response content type
1. If you have added "application/json" content type in rewrite config under /apps/project/config/rewriter/project then remove this content type from configuration.
2. Set content type to servlet json response in servlet so that link checker rewrite will not be applied this content type since this content type is removed in step 1.
Above 2 steps will resolve link checker issue on json content type response.
Servlet JSON response before fix:
Servlet JSON response after fix:
As i mentioned in above comment no need to removing a:href or disabling link checker from"Day CQ Link Checker Transformer"for the issue which your facing because this will completely remove link checker for other content type as well.
so, just add content type in servlet response as mentioned below. if you have already added this then please share the header & response tab screenshot from browser network tab when we can see whether content type is set or not in response headers.