File tree Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Expand file tree Collapse file tree 3 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff line change @@ -343,7 +343,6 @@ CLASS /ui2/cl_json IMPLEMENTATION.
343343 FIELD-SYMBOLS <ls_component> LIKE LINE OF lt_components.
344344
345345 prefix = mo_parsed->find_ignore_case( prefix ).
346-
347346* WRITE '@KERNEL console.dir(lo_type.get());'.
348347 CASE io_type->kind.
349348 WHEN cl_abap_typedescr=>kind_elem.
@@ -368,6 +367,8 @@ CLASS /ui2/cl_json IMPLEMENTATION.
368367 ELSE .
369368 data = lv_value.
370369 ENDIF .
370+ ELSEIF io_type->type_kind = cl_abap_typedescr=>typekind_xstring.
371+ data = cl_http_utility=>decode_x_base64( mo_parsed->value_string( prefix ) ).
371372 ELSEIF io_type->type_kind = cl_abap_typedescr=>typekind_time.
372373 lv_value = mo_parsed->value_string( prefix ).
373374 REPLACE ALL OCCURRENCES OF ':' IN lv_value WITH '' .
Original file line number Diff line number Diff 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.
680681ENDCLASS .
681682
682683CLASS 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 ,
You can’t perform that action at this time.
0 commit comments