Add a DeserializationFeature.FAIL_ON_TRAILING_TOKENS
to force reading of the whole input as single value
#1583
Milestone
(note: multiple ancestor issues, f.ex #1494 -- quite commonly requested, even if indirectly)
Users would often prefer to ensure that the whole input stream would be consumed for data-binding so that error would be signaled if: there are "leftover" tokens after valid content:
{ } 3
, or, specifically, if the whole taken into account is invalid:where just
"key"
would be valid JSON String, but when reading further parser detects malformed content where presumably curly braces are missing.Now: although support for such "full reads" could be handled using multiple means -- for example, by exposing, say,
readFullValue()
as alternative toreadValue()
-- it seems preferable to use a feature to support use-cases where developer does not control method called: this is often the case when using Jackson via framework like a JAX-RS implementation. If so, dev may be able to pre-configureObjectMapper
with suitable settings to affect change in reading behavior.The text was updated successfully, but these errors were encountered: