Skip to content

Commit

Permalink
issue_186
Browse files Browse the repository at this point in the history
  • Loading branch information
sbcgua committed Aug 5, 2024
1 parent d618c78 commit 536bcbb
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/core/zcl_ajson.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Check failure on line 4092 in src/core/zcl_ajson.clas.testclasses.abap

View check run for this annotation

abaplint / abaplint

Identifiers should be lower case: "li_jsonA"

https://rules.abaplint.org/keyword_case
data ls_act type ty_person.
data ls_exp type ty_person.

Check failure on line 4094 in src/core/zcl_ajson.clas.testclasses.abap

View check run for this annotation

abaplint / abaplint

Variable "ls_exp" not used

https://rules.abaplint.org/unused_variables
data lt_act type ty_persons.
data lt_exp type ty_persons.

Check failure on line 4096 in src/core/zcl_ajson.clas.testclasses.abap

View check run for this annotation

abaplint / abaplint

Variable "lt_exp" not used

https://rules.abaplint.org/unused_variables

li_json1 = zcl_ajson=>parse( '{ "name": "A",' &&
'"email": [ { "id": "1", "email": "[email protected]" }, { "id": "2", "email": "[email protected]" } ] }' ).
li_jsonA = zcl_ajson=>parse( '[' &&

Check failure on line 4100 in src/core/zcl_ajson.clas.testclasses.abap

View check run for this annotation

abaplint / abaplint

Identifiers should be lower case: "li_jsonA"

https://rules.abaplint.org/keyword_case
'{ "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 ).

Check failure on line 4106 in src/core/zcl_ajson.clas.testclasses.abap

View check run for this annotation

abaplint / abaplint

Identifiers should be lower case: "li_jsonA"

https://rules.abaplint.org/keyword_case

endmethod.

endclass.

**********************************************************************
Expand Down

0 comments on commit 536bcbb

Please sign in to comment.