-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue_186 #187
Draft
sbcgua
wants to merge
2
commits into
master
Choose a base branch
from
issue_186
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
issue_186 #187
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ | |
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 @@ | |
|
||
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. | ||
|
||
********************************************************************** | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code
Suggest following fix,