JsonParser respecting coercion configuration

8 views
Skip to first unread message

Maarten Raasveldt

unread,
Sep 10, 2024, 1:47:35 PM9/10/24
to jackson-user
Hi everyone,

Looking at jackson's ParserMinimalBase, configuration such as (com.fasterxml.jackson.databind.MapperFeature#ALLOW_COERCION_OF_SCALARS) is not checked , and implicit conversions are still done (see for example: com.fasterxml.jackson.core.base.ParserMinimalBase#getValueAsString(java.lang.String).

My question is, is there any way to use these json parsers while still not allowing any implicit conversions?

Tatu Saloranta

unread,
Sep 10, 2024, 1:49:47 PM9/10/24
to jackso...@googlegroups.com
Because parsers do not coerce anything unless asked explicitly: they
expose content as-is.

It is data-binding level that handles coercions.

-+ Tatu +-
Reply all
Reply to author
Forward
0 new messages