Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 5.0.1
    • Fix Version/s: 5.0.4
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      See issue raised initialy on spring-boot: https://github.com/spring-projects/spring-boot/issues/10756

      Jackson2SmileEncoder/Decoder declare "stream+x-jackson-smile" as a streaming MediaType, it doesn't seem to work by default. In my use case, we need binary encoding as we pass a lot a matrices and json just doesn't perform well for that case. CBOR would also be nice, if it came with a streaming option.

      I've attached a new sample project.

      Thank you

        Activity

        Hide
        sdeleuze Sébastien Deleuze added a comment -

        I have begin working on a fix (see this draft commit) but I am not 100% yet Smile stream non-blocking parsing is fully supported on Jackson and WebFlux codecs side.
        I need to ask confirmation to the Jackson project lead, add integration tests, and review these changes with Arjen Poutsma, so let's plan that for 5.0.3.

        Show
        sdeleuze Sébastien Deleuze added a comment - I have begin working on a fix (see this draft commit ) but I am not 100% yet Smile stream non-blocking parsing is fully supported on Jackson and WebFlux codecs side. I need to ask confirmation to the Jackson project lead, add integration tests, and review these changes with Arjen Poutsma , so let's plan that for 5.0.3.
        Hide
        sdeleuze Sébastien Deleuze added a comment -

        I have updated the branch which now contains the following changes:

        • Move getDecodableMimeTypes() to AbstractJackson2Decoder
        • Move getEncodableMimeTypes() to AbstractJackson2Encoder
        • Add support for application/stream+x-jackson-smile
        • Remove streaming line separator when pretty print is enabled or Smile encoder is used

        Currently there is a low level error thrown by Jackson in JacksonStreamingIntegrationTests:
        JsonParseException: Still have 13 undecoded bytes, should not call 'feedInput'
        Point has been raised on Jackson side, waiting for a feedback.

        Show
        sdeleuze Sébastien Deleuze added a comment - I have updated the branch which now contains the following changes: Move getDecodableMimeTypes() to AbstractJackson2Decoder Move getEncodableMimeTypes() to AbstractJackson2Encoder Add support for application/stream+x-jackson-smile Remove streaming line separator when pretty print is enabled or Smile encoder is used Currently there is a low level error thrown by Jackson in JacksonStreamingIntegrationTests : JsonParseException: Still have 13 undecoded bytes, should not call 'feedInput' Point has been raised on Jackson side, waiting for a feedback.
        Hide
        sdeleuze Sébastien Deleuze added a comment -

        I have created a dedicated issue on Jackson side: https://github.com/FasterXML/jackson-dataformats-binary/issues/127

        Show
        sdeleuze Sébastien Deleuze added a comment - I have created a dedicated issue on Jackson side: https://github.com/FasterXML/jackson-dataformats-binary/issues/127
        Hide
        sdeleuze Sébastien Deleuze added a comment -

        I have moved this issue to 5.0.4 since Jackson issue is not fixed yet.

        Show
        sdeleuze Sébastien Deleuze added a comment - I have moved this issue to 5.0.4 since Jackson issue is not fixed yet.
        Hide
        sdeleuze Sébastien Deleuze added a comment -

        I have provided a repro project as requested by Tatu. It should allow him to see if the issue is on Jackson side or in our Jackson2Tokenizer.

        Show
        sdeleuze Sébastien Deleuze added a comment - I have provided a repro project as requested by Tatu. It should allow him to see if the issue is on Jackson side or in our Jackson2Tokenizer .
        Hide
        sdeleuze Sébastien Deleuze added a comment -

        Tatu provided guidance that should allow us to update our implementation in order to make it work with Smile streaming (since it is not exactly the same than JSON).

        Show
        sdeleuze Sébastien Deleuze added a comment - Tatu provided guidance that should allow us to update our implementation in order to make it work with Smile streaming (since it is not exactly the same than JSON).

          People

          • Assignee:
            sdeleuze Sébastien Deleuze
            Reporter:
            benoitlep Benoit LEPREVOST
            Last updater:
            Stéphane Nicoll
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              4 weeks ago