Skip to content

Commit e15deb2

Browse files
committed
json bugfix
1 parent d65f340 commit e15deb2

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"@abaplint/cli": "^2.113.233",
1919
"@abaplint/database-pg": "^2.11.78",
2020
"@abaplint/database-sqlite": "^2.11.78",
21-
"@abaplint/runtime": "^2.12.5",
22-
"@abaplint/transpiler-cli": "^2.12.5",
21+
"@abaplint/runtime": "^2.12.7",
22+
"@abaplint/transpiler-cli": "^2.12.7",
2323
"0x": "^6.0.0"
2424
}
2525
}

src/json/#ui2#cl_json.clas.testclasses.abap

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ CLASS ltcl_serialize DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT F
677677
METHODS numc_field2 FOR TESTING RAISING cx_static_check.
678678
METHODS serialize_empty_xstring FOR TESTING RAISING cx_static_check.
679679
METHODS serialize_xstring FOR TESTING RAISING cx_static_check.
680+
METHODS xstring_identity FOR TESTING RAISING cx_static_check.
680681
ENDCLASS.
681682

682683
CLASS ltcl_serialize IMPLEMENTATION.
@@ -720,6 +721,27 @@ CLASS ltcl_serialize IMPLEMENTATION.
720721
exp = '{"FOO":"qg=="}' ).
721722
ENDMETHOD.
722723

724+
METHOD xstring_identity.
725+
DATA: BEGIN OF is_metadata,
726+
foo TYPE xstring,
727+
END OF is_metadata.
728+
DATA lv_json TYPE string.
729+
is_metadata-foo = 'AA'.
730+
lv_json = /ui2/cl_json=>serialize( is_metadata ).
731+
732+
CLEAR is_metadata.
733+
734+
/ui2/cl_json=>deserialize(
735+
EXPORTING
736+
json = lv_json
737+
CHANGING
738+
data = is_metadata ).
739+
740+
cl_abap_unit_assert=>assert_equals(
741+
act = is_metadata-foo
742+
exp = 'AA' ).
743+
ENDMETHOD.
744+
723745
METHOD bool_false.
724746
DATA: BEGIN OF ls_data,
725747
foo_bar TYPE abap_bool,

0 commit comments

Comments
 (0)