[ 
https://issues.apache.org/jira/browse/JOHNZON-319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161465#comment-17161465
 ] 

Markus Jung commented on JOHNZON-319:
-------------------------------------

Hi Romain,

do I understand you correctly? You'd pass the properties through the 
JohnzonBuilder to the MapperBuilder (like "johnzon.use-big-decimal-for-object", 
or "jsonb.formatting" for example) to the corresponding generator/reader 
factories being created? (e. g. MapperBuilder#setMaxSize(int) for my example, 
it's there but unused by the jsonb module)

If you're okay with this I'll be looking at which properties are also affected 
by this issue and make a PR.

 

 

> Properties regarding Json reader/generator ignored if no JsonProvider is set
> ----------------------------------------------------------------------------
>
>                 Key: JOHNZON-319
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-319
>             Project: Johnzon
>          Issue Type: Bug
>          Components: JSON-B
>    Affects Versions: 1.2.8
>            Reporter: Markus Jung
>            Priority: Minor
>         Attachments: ignored-property.zip
>
>
> JohnzonBuilder ignores properties which shouid affect the Json 
> reader/generator if no JsonProvider has been set. I noticed this using the 
> "org.apache.johnzon.max-string-length" property.
> JohnzonBuilder#build() looks somewhat like this behaviour is intended, but a 
> property just being ignored feels unintuitive. I'd be sending you a PR for 
> this, but I dont know this project well enough to decide whether or not 
> always initializing the generator/reader factories to ensure set properties 
> are being respected is a good idea. Maybe somebody could hint me in the right 
> direction there?
> I attached an example project that demonstrates this issue, the first call to 
> Jsonb#fromJson(String, Class) should already be throwing a 
> JsonParsingException.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to