Expand my Community achievements bar.

SOLVED

Question:Using SlingAllMethodsServlet interface changed in AEM 6.2??

Avatar

Level 9

Hi All,

We have servlet which has implemented 'SlingAllMethodsServlet' with overriding doPost() and set returned content type as text/JSON .

In Sightly component we are accessing this servlet using $.ajax(....).

Observed ,to use this response json in Sightly component html ,no need to parse this response using $.parseJSON(response) instead i can directly use this response(var json =response) object to extract values(json.compTitle,json.Description).

Is my understanding correct or not??

or this is also one way we can get values from response object?

Please clarify if anyone has any idea.

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Kishore,

In Sightly, you can directly extract the JSON data without parsing as it treats the response as an object. 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Kishore,

In Sightly, you can directly extract the JSON data without parsing as it treats the response as an object.