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

JsonbAdapter to JsonString serializes pedantically/incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.12
    • 1.1.13
    • JSON-B
    • None

    Description

      Adapting to JsonString to stringify complex or unsupported datatypes to JSON produces unexpected serializations like:

      {"customerIds":[{"chars":"46c17c24-4b37-4205-9fa3-873380581a34","string":"46c17c24-4b37-4205-9fa3-873380581a34","valueType":"STRING"}]}

      JSON-P JsonString serialization works as expected with Yasson.

      This is a violation of Section 3.20 of the JSON-B 1.0 spec:

      JSON Binding implementations MUST support binding of the following JSON Processing types:
      ...
      •    javax.json.JsonString
      ...

      Serialization of supported javax.json.* objects/interfaces/fields MUST have the same result as serialization these objects with javax.json.JsonWriter.

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            derekm Derek Moore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: