sbcgua / ajson

Yet another json parser serializer for ABAP
MIT License
49 stars 15 forks source link

Deserializing into hashed/sorted itab keeps wrong component values #181

Closed thorsten-wolf-neptune closed 2 weeks ago

thorsten-wolf-neptune commented 3 weeks ago

Hi,

realted to abapgit deserialization with the "Skip initial values" feature i noticed a bug that when deserializing a JSON Array into an internal table that is hashed or sorted (which we have in abapgit (see:

https://github.com/abapGit/abapGit/blob/618f5ec2796b4523ef0b2bb0c74fb1f1e8e11a4b/src/data/zcl_abapgit_data_deserializer.clas.abap#L291C44-L291C60

https://github.com/abapGit/abapGit/blob/618f5ec2796b4523ef0b2bb0c74fb1f1e8e11a4b/src/data/zcl_abapgit_data_utils.clas.abap#L101

), there are previous non-empty values kept and put into the target lines that are supposed to have blank values for the corresponding components: image

I tested with various table key types and the issue happens for:

It does not happen for standard tables (even with a non-unique key)

image

thorsten-wolf-neptune commented 2 weeks ago

fixed with https://github.com/sbcgua/ajson/pull/182