-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3748,6 +3748,7 @@ class ltcl_integrated definition | |
methods chaining for testing raising zcx_ajson_error. | ||
methods push_json for testing raising zcx_ajson_error. | ||
methods is_empty for testing raising zcx_ajson_error. | ||
methods issue_186 for testing raising zcx_ajson_error. | ||
|
||
endclass. | ||
|
||
|
@@ -4073,6 +4074,39 @@ class ltcl_integrated implementation. | |
|
||
endmethod. | ||
|
||
method issue_186. | ||
|
||
types: | ||
begin of ty_contact, | ||
id type string, | ||
email type string, | ||
end of ty_contact, | ||
ty_contacts type standard table of ty_contact with key id, | ||
begin of ty_person, | ||
name type string, | ||
email type ty_contacts, | ||
end of ty_person, | ||
ty_persons type standard table of ty_person with key name. | ||
|
||
data li_json1 type ref to zif_ajson. | ||
data li_jsonA type ref to zif_ajson. | ||
data ls_act type ty_person. | ||
data ls_exp type ty_person. | ||
data lt_act type ty_persons. | ||
data lt_exp type ty_persons. | ||
|
||
li_json1 = zcl_ajson=>parse( '{ "name": "A",' && | ||
'"email": [ { "id": "1", "email": "[email protected]" }, { "id": "2", "email": "[email protected]" } ] }' ). | ||
li_jsonA = zcl_ajson=>parse( '[' && | ||
'{ "name": "A", "email": [ { "id": "1", "email": "[email protected]" }, { "id": "2", "email": "[email protected]" } ] },' && | ||
'{ "name": "B", "email": [ { "id": "3", "email": "[email protected]" }, { "id": "4", "email": "[email protected]" } ] }' && | ||
']' ). | ||
|
||
li_json1->to_abap( importing ev_container = ls_act ). | ||
li_jsonA->to_abap( importing ev_container = lt_act ). | ||
|
||
endmethod. | ||
|
||
endclass. | ||
|
||
********************************************************************** | ||
|