I have a number of services in my solution that are invoked via RESTful POST requests from an external application. The services must respond with a set of values. Each service responds with a different set of values (and as the solution matures over time, these responses could become more diverse and more numerous).
The response from the services must be in a JSON format. I've set up the services to have the result type = JSON, but everything I try generates an error with the service. Here is a simplified example of what may be included in the response:
"siteId": <string>, // calculated by the service
"areaName": <string>, // pulled from a different Thing
"percentFailed": <number> // calculated by the service
If I use the same as above, but set the result type to STRING in the service composer window, it doesn't crash, but the response contains lots of extraneous information. For example:
This is generating additional unnecessary parsing in the requesting application. I would prefer to only have the result object returned.
Any ideas are greatly appreciated!