[User] JSON Array Cut in REST-BC

Paul Perez paul.perez at pymma.com
Wed May 20 08:51:34 BST 2020


Hello Edwin, 

Don't worry about your English. I'm a French speaker, and we understand
perfectly what you write. 
As Explained in the OpenESB web site, if you need to get a kind of support
from the community, I would advise you to create a short and deployable
project where we can see and analyse all the facets of your JSON to XLM
transformation. 
Without this sample, we are unable to provide you with a response.
Please feel free to zip your simple project and send it to the user group.
Have a good day

Best regards

Paul Perez Chief Architect
Pymma Consulting
--------------------------
Tel: +44 79 44 36 04 65 
Skype ID : polperez

-----Original Message-----
From: User <user-bounces at lists.open-esb.net> On Behalf Of edwin.agudelo via
User
Sent: 19 May 2020 13:19
To: user at lists.open-esb.net
Cc: edwin.agudelo <edwin.agudelo at gmail.com>
Subject: [User] JSON Array Cut in REST-BC

Hello.

I work on a project that expose an REST API. In the definition I have a JSON
array. When the response have just one element the response not have the
JSON array form ([element]) but if have more elements the array is well
formed.

This is an example:

With one element:

"ordenDetalles": {
                    "idDetalle": 81,
                    "cantidadItem": 0,
                    "valor": 50000,
                    "idProducto": 3434
                }

With more elements:

"ordenDetalles": [
                    {
                        "idDetalle": 482,
                        "cantidadItem": 0,
                        "valor": 0,
                        "idProducto": 1
                    },
                    {
                        "idDetalle": 483,
                        "cantidadItem": 0,
                        "valor": 0,
                        "idProducto": 4
                    }
                ]

I try to redefine the XML but not work.

Someone can said me what to do or what to change? 

First of all, Thanks.

*Note*: Sorry for my english.



--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/



More information about the User mailing list