File tree 1 file changed +5
-0
lines changed
src/test/java/com/fasterxml/jackson/databind/deser/creators
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 8
8
import com .fasterxml .jackson .annotation .JsonCreator ;
9
9
import com .fasterxml .jackson .annotation .JsonProperty ;
10
10
import com .fasterxml .jackson .annotation .JsonTypeInfo ;
11
+ import com .fasterxml .jackson .annotation .JsonValue ;
11
12
import com .fasterxml .jackson .databind .DatabindContext ;
12
13
import com .fasterxml .jackson .databind .JavaType ;
13
14
import com .fasterxml .jackson .databind .ObjectMapper ;
@@ -93,10 +94,12 @@ static final class StringValue implements Value {
93
94
94
95
private final String value ;
95
96
97
+ @ JsonCreator (mode = JsonCreator .Mode .DELEGATING )
96
98
public StringValue (String value ) {
97
99
this .value = value ;
98
100
}
99
101
102
+ @ JsonValue
100
103
public String getValue () {
101
104
return value ;
102
105
}
@@ -106,10 +109,12 @@ static final class LongValue implements Value {
106
109
107
110
private final long value ;
108
111
112
+ @ JsonCreator (mode = JsonCreator .Mode .DELEGATING )
109
113
public LongValue (long value ) {
110
114
this .value = value ;
111
115
}
112
116
117
+ @ JsonValue
113
118
public long getValue () {
114
119
return value ;
115
120
}
You can’t perform that action at this time.
0 commit comments