Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Mapping POSTed JSON Enum parameter which implements an Interface

$
0
0
Hi,

I have a class with 2 enum properties - a concrete one (A), and one that
implements an interface (B) and has multiple implementations, which are
possible values for the selected value of A. If A has the value 1, the B
will be of type Enum1, which has the possible values for type 1.

When I POST to a REST endpoint to create this object, CXF has problems
because of the Interface.

What's the best way to add something that will allow JSON posted to be
mapped to the right enum type for the 2nd Enum?

Viewing all articles
Browse latest Browse all 5648

Trending Articles