내 커뮤니티 업적 표시줄을 확대합니다.

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

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

React SPA: filter model.json before fetch

Avatar

Level 2

Is it possible to filter the en.model.json before the fetch?  Our json is large, and want to remove extraneous key/values, specifically the "allowedComponents" that returns a long list of components for every page and appears to be the majority of bloat in the response:

[":children"]["/content/my-app/us/en/my-page"][":items"].root.allowedComponents.components

 

Perhaps there are query parameters or some other way to return a smaller json response?

 

I found this tutorial that allows modifying the fetch - although I'm not certain it would be useful in this case: http://experience-aem.blogspot.com/2021/09/aem-cloud-service-pass-request-parameters-in-react-spa-mo...

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 5

Allowed components property is perhaps required by editable components module inside AEM Editor. However for the standalone app, one option is to connect with publisher or you can pass a custom header which can be scanned by a custom sling filter which can parse entire json and remove unwanted attributes. Latter option is a generic json filtering solution so there is no need to worry about overriding container/responsivegrid exporters and that also happens when the custom header is present.

원본 게시물의 솔루션 보기

2 답변 개

Avatar

Employee

Avatar

정확한 답변 작성자:
Level 5

Allowed components property is perhaps required by editable components module inside AEM Editor. However for the standalone app, one option is to connect with publisher or you can pass a custom header which can be scanned by a custom sling filter which can parse entire json and remove unwanted attributes. Latter option is a generic json filtering solution so there is no need to worry about overriding container/responsivegrid exporters and that also happens when the custom header is present.