Code: Alles auswählen.
/UI2/CL_JSON=>DESERIALIZE( EXPORTING JSON = LV_DATA
CHANGING DATA = AUSGABE ).
Code: Alles auswählen.
DATA m_ref TYPE REF TO /ui5/cl_json_parser. "#EC NOTEXT
DATA m_json TYPE string.
CREATE OBJECT m_ref.
CONCATENATE
'{'
' "users": ['
' {'
' "user": {'
' "company": "My \"great\" company",'
' "firstName": "Pawel",'
' "lastName": "Checkov",'
' "mail": "pavel@company.com",'
' "hasMail": true,'
' "id": 4711 , "float": 123.45,'
' "socialIdentities": {}'
' }'
' },'
' {'
' "user": {'
' "company":"Another \u0022great\u0022 company","firstName":"J\u00fcrgen"'
' }'
' }'
' ]'
'}' INTO m_json SEPARATED BY cl_abap_char_utilities=>cr_lf.
m_ref->parse( m_json ).
cl_demo_output=>display_data( m_ref->m_entries ).