Petals BC REST

Move from Jettison to Staxon for JSON<->XML conversion, customization via SU parameters

Details

  • Type: Improvement Request Improvement Request
  • Status: In Progress In Progress
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0.1-BC
  • Fix Version/s: 2.5.0-BC
  • Security Level: Public
  • Description:
    Hide

    Jettison is quite limited in the way it can be customized and its badgerfish conversion implementation is missing some important features (in particular to handle JSON document that would be converted to XML documents with multiple roots, something forbidden in XML).

    Staxon is an alternative implementation that supports an improved badgerfish conversion that is customizable.
    It is also more efficient in terms of memory usage and can use gson, jackson or jsr353 as the JSON reader/writer.

    Moving to Staxon introduces the following SU parameters (both for provides and consumes):

    http-body-to-json-multiple-pi default to false
    http-body-from-json-multiple-pi default to false
    
    http-body-to-json-virtual-root default to null
    http-body-from-json-virtual-root default to null
    
    http-body-to-json-auto-array default to false
    
    http-body-to-json-auto-primitive default to false
    
    http-body-to-json-pretty-print default to false
    
    http-body-to-json-ns-declarations default to false
    
    namespace-mapping/@prefix (value is the namespace URI, no mapping by default)

    See https://github.com/beckchr/staxon/wiki/Factory-Configuration for details.

    We could also introduce options to exploit XMLMultipleStreamWriter (see https://github.com/beckchr/staxon/wiki/Mastering-Arrays).

    Show
    Jettison is quite limited in the way it can be customized and its badgerfish conversion implementation is missing some important features (in particular to handle JSON document that would be converted to XML documents with multiple roots, something forbidden in XML). Staxon is an alternative implementation that supports an improved badgerfish conversion that is customizable. It is also more efficient in terms of memory usage and can use gson, jackson or jsr353 as the JSON reader/writer. Moving to Staxon introduces the following SU parameters (both for provides and consumes):
    http-body-to-json-multiple-pi default to false
    http-body-from-json-multiple-pi default to false
    
    http-body-to-json-virtual-root default to null
    http-body-from-json-virtual-root default to null
    
    http-body-to-json-auto-array default to false
    
    http-body-to-json-auto-primitive default to false
    
    http-body-to-json-pretty-print default to false
    
    http-body-to-json-ns-declarations default to false
    
    namespace-mapping/@prefix (value is the namespace URI, no mapping by default)
    See https://github.com/beckchr/staxon/wiki/Factory-Configuration for details. We could also introduce options to exploit XMLMultipleStreamWriter (see https://github.com/beckchr/staxon/wiki/Mastering-Arrays).
  • Environment:
    -

Activity

Christophe DENEUX made changes - Tue, 11 Apr 2023 - 11:37:18 +0200
Fix Version/s 2.5.0-BC [ 11099 ]
Fix Version/s 1.1.0-BC [ 10696 ]
Fix Version/s 2.4.0-BC [ 10903 ]
Christophe DENEUX made changes - Thu, 27 Sep 2018 - 11:11:35 +0200
Fix Version/s 1.3.1-BC [ 10903 ]
Fix Version/s 1.3.0-BC [ 10864 ]
Christophe DENEUX made changes - Thu, 26 Jul 2018 - 16:43:30 +0200
Assignee Victor NOËL [ vnoel ]
Fix Version/s 1.2.1-BC [ 10864 ]
Fix Version/s 1.2.0-BC [ 10821 ]
Christophe DENEUX made changes - Thu, 15 Feb 2018 - 14:48:35 +0100
Fix Version/s 1.1.2-BC [ 10821 ]
Fix Version/s 1.1.1-BC [ 10768 ]
Christophe DENEUX made changes - Thu, 4 Jan 2018 - 11:21:51 +0100
Fix Version/s 1.1.1-BC [ 10768 ]
Christophe DENEUX made changes - Tue, 5 Dec 2017 - 12:05:41 +0100
Description Jettison is quite limited in the way it can be customized and its badgerfish conversion implementation is missing some important features (in particular to handle JSON document that would be converted to XML documents with multiple roots, something forbidden in XML).

Staxon is an alternative implementation that supports an improved badgerfish conversion that is customizable.
It is also more efficient in terms of memory usage and can use gson, jackson or jsr353 as the JSON reader/writer.

Moving to Staxon introduces the following SU parameters (both for provides and consumes):

{code}
http-body-to-json-multiple-pi default to false
http-body-from-json-multiple-pi default to false

http-body-to-json-virtual-root default to null
http-body-from-json-virtual-root default to null

http-body-to-json-auto-array default to false

http-body-to-json-auto-primitive default to false

http-body-to-json-pretty-print default to false

http-body-to-json-ns-declarations default to false
{code}

See https://github.com/beckchr/staxon/wiki/Factory-Configuration for details.

We could also introduce options to exploit {{XMLMultipleStreamWriter}} (see https://github.com/beckchr/staxon/wiki/Mastering-Arrays).
Jettison is quite limited in the way it can be customized and its badgerfish conversion implementation is missing some important features (in particular to handle JSON document that would be converted to XML documents with multiple roots, something forbidden in XML).

Staxon is an alternative implementation that supports an improved badgerfish conversion that is customizable.
It is also more efficient in terms of memory usage and can use gson, jackson or jsr353 as the JSON reader/writer.

Moving to Staxon introduces the following SU parameters (both for provides and consumes):

{code}
http-body-to-json-multiple-pi default to false
http-body-from-json-multiple-pi default to false

http-body-to-json-virtual-root default to null
http-body-from-json-virtual-root default to null

http-body-to-json-auto-array default to false

http-body-to-json-auto-primitive default to false

http-body-to-json-pretty-print default to false

http-body-to-json-ns-declarations default to false

namespace-mapping/@prefix (value is the namespace URI, no mapping by default)
{code}

See https://github.com/beckchr/staxon/wiki/Factory-Configuration for details.

We could also introduce options to exploit {{XMLMultipleStreamWriter}} (see https://github.com/beckchr/staxon/wiki/Mastering-Arrays).
Christophe DENEUX made changes - Fri, 27 Jan 2017 - 13:54:42 +0100
Fix Version/s 1.1.0 [ 10696 ]
Victor NOËL made changes - Tue, 17 Jan 2017 - 14:34:18 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Victor NOËL made changes - Tue, 17 Jan 2017 - 14:33:38 +0100
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Assignee Christophe DENEUX [ cdeneux ] Victor NOËL [ vnoel ]

People

Dates

  • Created:
    Tue, 17 Jan 2017 - 14:33:13 +0100
    Updated:
    Tue, 11 Apr 2023 - 11:37:18 +0200