No sé, pero no parece buena idea llamar a las etiquetas de un json con caracteres "@" o "$"

El 23/06/2020 a las 12:29, Jesus Maria Arzak (DHL ES) escribió:

Buenos Dias

 

Estamos teniendo problemas al querer recuperar ciertos valores de un JSON desde un RPG

 

El JSON es el siguientes

 

'{"BPIShipmentQueryResponse" : {"Header" : {"DateTime" : "2020-06-19T13:52:23Z",  "@unit": "KG", "$" : 0.55 }}}             

 

La sentencia  que ejecutamos es la siguiente

 

Select  *                                                 

From                                                      

  json_table(:xmlBuffer ,                                 

            'lax $.BPIShipmentQueryResponse.Header'       

            COLUMNS(dia     char(25) path 'lax $.DateTime'

                     default '  ' on empty,               

                    unidad  char(25) path 'lax $.@unit'   

                     default 'error' on empty,            

                    "$"     dec(6, 2)                     

                     default '99 ' on empty               

                   )                                      

            ) as l    ;                                   

 

 

Cuando intentamos recuperar las etiquetas “@unit” y “$” nos devuelve los valores por defecto porque al parecer no las encuentra

 

Se os ocurre alguna forma de poder solucionarlo ?

 

 

Un saludo

 

Jesús Mª Arzak Capilla

Solutions Management

DHL Parcel Iberia, S.L.U.

Paseo Mikeletegi, nº 65
Parque Tecnológico de San Sebastián
E-20009 San Sebastián

Phone: +34 943 37 81 37


[email protected]

www.dhlparcel.es

GOGREEN – Environmental protection with DHL
Por favor, ten en cuenta el medio ambiente antes de imprimir este correo

 

 

 

CONFIDENTIALITY NOTICE: This message is from DHL and may contain confidential business information. It is intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient please contact the sender and delete this message and any attachment from your system. Unauthorized publication, use, dissemination, forwarding, printing or copying of this E-Mail and its attachments is strictly prohibited.

____________________________________________________
�nete a Recursos AS400, nuestra Comunidad ( http://bit.ly/db68dd )
Forum.Help400 � Publicaciones Help400, S.L.



Logotipo Ayuntamiento Vitoria-Gasteiz
José de la Herran Núñez
Kordinazio Teknikoko Burua
Jefe del Área de Coordinación Técnica

Informazioaren Teknologien Saila
Departamento de Tecnologías de la Información

Tel: 945161614 | Fax 945161600
| www.vitoria-gasteiz.org
Logotipo Green Capital

KONFIDENTZIALTASUNA

Komunikazio honen edukia eta honi erantsitako dokumentazio osoarena konfidentziala da eta adierazitako jasotzaileari beste inori ez dagokio.
Zeu jasotzaile ez bazina, jakinaraz iezaguzu, mesedez, eta eskatu nahi dizugu edukiaren berri inori ez esan eta mezua ezaba dezazula.

CONFIDENCIALIDAD

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo.
En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

CONFIDENCIALITY

The content of this communication and any attached information is confidential and exclusively for the use of the addressee.
If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.


____________________________________________________
�nete a Recursos AS400, nuestra Comunidad ( http://bit.ly/db68dd )
Forum.Help400 � Publicaciones Help400, S.L.

Reply via email to