@@ -24,12 +24,30 @@ public enum StreamReadCapability
24
24
* Capability may be used for allowing secondary mapping of such duplicates
25
25
* in case of using Tree Model (see {@link TreeNode}), or "untyped" databinding
26
26
* (mapping content as generic {@link java.lang.Object}).
27
- *
28
27
*<p>
29
- * Capability is typically {@code false}, hence default .
28
+ * Capability is currently only enabled for XML format backend .
30
29
*/
31
30
DUPLICATE_PROPERTIES (false ),
32
31
32
+ /**
33
+ * Capability that indicates that data format may in some cases expose Scalar values
34
+ * (whether typed or untyped) as Object values. There are additional access methods
35
+ * at databind level: this capability may be used to decide whether to attempt to
36
+ * use such methods especially in potentially ambiguous cases.
37
+ *<p>
38
+ * Capability is currently only enabled for XML format backend.
39
+ */
40
+ SCALARS_AS_OBJECTS (false ),
41
+
42
+ /**
43
+ * Capability that indicates that data format only exposed "untyped" scalars: that is,
44
+ * instead of Number, Boolean and String types all scalar values are reported as
45
+ * text ({@link JsonToken#VALUE_STRING})
46
+ * unless some sort of coercion is implied by caller.
47
+ *<p>
48
+ * This capability is true for many textual formats like CSV, Properties and XML.
49
+ */
50
+ UNTYPED_SCALARS (false ),
33
51
;
34
52
35
53
/**
@@ -50,5 +68,4 @@ private StreamReadCapability(boolean defaultState) {
50
68
public boolean enabledIn (int flags ) { return (flags & _mask ) != 0 ; }
51
69
@ Override
52
70
public int getMask () { return _mask ; }
53
-
54
71
}
0 commit comments