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]<mailto:%[email protected]>
www.dhlparcel.es<http://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.

Reply via email to