Uploaded image for project: 'Johnzon'
  1. Johnzon
  2. JOHNZON-319

Properties regarding Json reader/generator ignored if no JsonProvider is set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.2.8
    • None
    • JSON-B
    • None

    Description

      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.

      Attachments

        1. ignored-property.zip
          2 kB
          Markus Jung

        Issue Links

          Activity

            People

              Unassigned Unassigned
              markus-jung Markus Jung
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m