REST Endpoint: Consume / Produce JSON/XML



Import Jackson Data format:



Annotate the REST method to consume and produce the desired format(s):


In HTTP Request header, set attribute:
  • Content-Type to application/json|xml to indicate the body format
  • Accept to application/json|xml to indicate the desired response format