@@ -302,7 +302,7 @@ protected Collection<Object> _deserializeFromString(JsonParser p, Deserializatio
302
302
// Start by verifying if we got empty/blank string since accessing
303
303
// CoercionAction may be costlier than String value we'll almost certainly
304
304
// need anyway
305
- if (value .isEmpty ()) { // ... in future may want to allow blank, too?
305
+ if (value .isEmpty ()) {
306
306
CoercionAction act = ctxt .findCoercionAction (logicalType (), rawTargetType ,
307
307
CoercionInputShape .EmptyString );
308
308
act = _checkCoercionFail (ctxt , act , rawTargetType , value ,
@@ -315,6 +315,14 @@ protected Collection<Object> _deserializeFromString(JsonParser p, Deserializatio
315
315
p , ctxt , act , rawTargetType , "empty String (\" \" )" );
316
316
}
317
317
}
318
+ // 26-Mar-2021, tatu: Some day is today; as per [dataformat-xml#460],
319
+ // we do need to support blank String too...
320
+ else if (_isBlank (value )) {
321
+ final CoercionAction act = ctxt .findCoercionFromBlankString (logicalType (), rawTargetType ,
322
+ CoercionAction .Fail );
323
+ return (Collection <Object >) _deserializeFromEmptyString (
324
+ p , ctxt , act , rawTargetType , "blank String (all whitespace)" );
325
+ }
318
326
return handleNonArray (p , ctxt , createDefaultInstance (ctxt ));
319
327
}
320
328
0 commit comments