Suppose we have a service with the following contract:
public interface CategoryService {
public int createNew(String languageCode, String name, String descriptionMarkdown, Integer parentCategoryID, String createdByUserName) throws ServiceException;
};
How do I map the int return type to produce a JSON value like the following?
PS: I know that the createNew method will have to be an HTTP POST request (annotation @POST). Assumes annotations are there. I just need the response representation.
{"id": 1}
Aucun commentaire:
Enregistrer un commentaire