java - Jersey: Exception Mapper to validate enum values while marshaling request payload -
java - Jersey: Exception Mapper to validate enum values while marshaling request payload -
using many enum classes rest application. things likes status, currency etc covered using enums. right have validate every request @ rest controller level against it's corresponding enum value. there way grab error @ marshaling level , handle via exception mapper? webservice supports both xml , json formats. xml taken care jaxb , json implemented using jackson api.
for understand, trying same : exception mapping enum
so missing might @jsoncreator fromstring method add together in enum code.
java rest jaxb jersey jackson
Comments
Post a Comment