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

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -