Hi Karthick,
If you have API to consume it , definetely you will be able to get JSON from the API
for example , I have public API which provides you the JSON
https://jsonplaceholder.typicode.com/users
The best way, is letting Mendix to the work for you:
Now click button “Generate mapping(s)” and Mendix will create an import- and an export-mapping for you. Tadaah, you got your json(s).
Alternatively you can add OQL, pullrequest.zip which includes a export-to-json-function.