How to remove aem properties jcr:lastModifiedBy from model.json since we dont have in sling model
How we can remove it by overriding that properties ?
How we can remove it by overriding that properties ?
@pratikshah : How are you trying to access json for your component/page?
I am assuming you are just changing the extension to '.json'. Please correct me if that is not the case. With this, it will give all the properties that exists for your content such as jcr:lastModifiedBy. And this way of accessing content as json should not be allowed and would not work when you access it from dispatcher as all such json requests would be blocked.
If you have a sling model, then you should be doing sling model exporter. It will only return the properties which are defined as part of your component and has a getter method/field in your model. Please refer- https://medium.com/@toimrank/aem-sling-model-exporter-90dc872835b9
AEM documentation for the same- https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/developing/full-stack/components-templates/enabling-json-exporter.html?lang=en
thanks.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.