I added this method in my struts action,
public String execute() {
long start = System.currentTimeMillis();
simDetails = new SIMDetails();
return GET_SIM_DETAILS;
}
and added below action in struts config file,
<result type="json" name="getSIMDetails">
<param name="noCache">true</param>
<param name="includeProperties">simDetails.*</param>
</result>
Then i got below JSON response
{
"simDetails": {
"void": null,
"ban": null,
"currentTariff": null,
"currentTariffDescription": null,
"defaultTariff": null,
"defaultTariffDescription": null,
"imsi": null,
"packageItemId": null,
"simSerialNumber": null,
"simStatus": null,
"simStatusCC": null,
"status": null,
"subscriberNumber": null,
"subsidaryCode": null
}
}
but I need this response instead of the above,
{
"void": null,
"ban": null,
"currentTariff": null,
"currentTariffDescription": null,
"defaultTariff": null,
"defaultTariffDescription": null,
"imsi": null,
"packageItemId": null,
"simSerialNumber": null,
"simStatus": null,
"simStatusCC": null,
"status": null,
"subscriberNumber": null,
"subsidaryCode": null
}
Any idea to get the required response with out add the above field to my action class.