SAP ABAP Class CL_FDT_JSON_SERVICES (JSON transformation services)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-SRV-BR (Application Component) BRFplus - ABAP-Based Business Rules
     SFDT_CORE (Package) BRFplus: Core
Properties
Class CL_FDT_JSON_SERVICES  
Short Description JSON transformation services    
Super Class    
Instantiability of a Class 2  Public 
Final    
General Data
Message Class    
Program status     
Category 0   
Package SFDT_CORE   BRFplus: Core 
Created 20131202   SAP 
Last change 20141121    
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
# Type group / Object type Type Type Description
1 ABAP Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
2 IF_FDT_TYPES Forward declaration interface (INTERFACE i DEFINITION DEF...  Forward declaration interface (INTERFACE i DEFINITION DEF...
Interfaces
Class CL_FDT_JSON_SERVICES has no interface implemented.
Friends
Class CL_FDT_JSON_SERVICES has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 GC_CONTENT_TYPE_CONTEXT Constant Public Type reference (TYPE) STRING 'Context' 20131205
2 GC_CONTENT_TYPE_NONE Constant Public Type reference (TYPE) STRING 'None' 20131205
3 GC_CONTENT_TYPE_RESULT Constant Public Type reference (TYPE) STRING 'Result' 20131205
4 GC_FORMAT_VERSION Constant Public Type reference (TYPE) STRING 'BRFplus JSON 1.01' JSON Version 20131205
Methods
# Method Level Visibility Method type Description Created on
1 CONTEXT_TO_JSON Static method Public Method Convert function context into a JSON string 20131205
2 EXPORT_TO_JSON Static method Public Method Convert content to JSON 20131205
3 GET_STRUCTURE_FOR_CONTEXT Static method Public Method Create dynamic structure for data objects in a context 20131205
4 GET_STRUCTURE_FOR_DATA_OBJECTS Static method Public Method Create a dynamic structure for a list of data objects 20131205
5 GET_STRUCTURE_FOR_RESULT Static method Public Method Create dynamic structure for data object(s) in a result 20131205
6 IMPORT_FROM_JSON Static method Public Method Convert JSON to content 20131205
7 JSON_TO_CONTEXT Static method Public Method Fill function context from JSON string 20131205
8 JSON_TO_RESULT Static method Public Method Fill result from JSON string 20131205
9 RESULT_TO_JSON Static method Public Method Convert function result into a JSON string 20131205
Events
Class CL_FDT_JSON_SERVICES has no event.
Types
# Type Visibility Typing Associated Type Description Created on Type Source
1 S_JSON_CONTENT Private See coding 20131205 BEGIN OF s_json_content, format TYPE string, type TYPE string, version type string, data TYPE REF TO data, END OF s_json_content
Method Signatures

Method CONTEXT_TO_JSON Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IO_CONTEXT Call by reference Object reference (TYPE REF TO) IF_FDT_CONTEXT FDT: Context 20131205
2 Importing IV_EXPORT Call by reference Type reference (TYPE) ABAP_BOOL Exportable format 20131205
3 Returning RV_JSON Value transfer Type reference (TYPE) STRING 20131205
# Exception Resumable Description Created on
1 CX_FDT FDT: Abstract Exception Class 20131205

Method EXPORT_TO_JSON Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IA_DATA Call by reference Type reference (TYPE) ANY 20131205
2 Importing IV_CONTENT_TYPE Call by reference Type reference (TYPE) STRING 20131205
3 Importing IV_VERSION Call by reference Type reference (TYPE) STRING 20131205
4 Returning RV_JSON Value transfer Type reference (TYPE) STRING 20131205
# Exception Resumable Description Created on
1 CX_FDT_JSON FDT: Errors related to JSON transformation 20131205

Method GET_STRUCTURE_FOR_CONTEXT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EO_STRUCTDESCR Call by reference Object reference (TYPE REF TO) CL_ABAP_STRUCTDESCR Runtime Type Services 20131205
2 Exporting ER_STRUCTURE Call by reference Object reference (TYPE REF TO) DATA Structure data 20131205
3 Importing IO_CONTEXT Call by reference Object reference (TYPE REF TO) IF_FDT_CONTEXT FDT: Context 20131205
4 Importing IV_SET_VALUES Call by reference Type reference (TYPE) ABAP_BOOL Set values from context 20131205
# Exception Resumable Description Created on
1 CX_FDT FDT: Abstract Exception Class 20131205

Method GET_STRUCTURE_FOR_DATA_OBJECTS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EO_STRUCTDESCR Call by reference Object reference (TYPE REF TO) CL_ABAP_STRUCTDESCR Runtime Type Services 20131205
2 Exporting ER_STRUCTURE Call by reference Object reference (TYPE REF TO) DATA Structure data 20131205
3 Importing ITS_ID_DOBJ Call by reference Type reference (TYPE) IF_FDT_TYPES=>TS_OBJECT_ID Object IDs as sorted table 20131205
4 Importing IV_SORT_BY_NAME Call by reference Type reference (TYPE) ABAP_BOOL ABAP_TRUE Sort structure components by name 20131205
5 Importing IV_TIMESTAMP Call by reference Type reference (TYPE) IF_FDT_TYPES=>TIMESTAMP Time Stamp (active version, UTC) 20131205
# Exception Resumable Description Created on
1 CX_FDT FDT: Abstract Exception Class 20131205

Method GET_STRUCTURE_FOR_RESULT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EO_STRUCTDESCR Call by reference Object reference (TYPE REF TO) CL_ABAP_STRUCTDESCR Runtime Type Services 20131205
2 Exporting ER_STRUCTURE Call by reference Object reference (TYPE REF TO) DATA Structure data 20131205
3 Importing IO_RESULT Call by reference Object reference (TYPE REF TO) IF_FDT_RESULT FDT: Context 20131205
4 Importing IV_SET_VALUES Call by reference Type reference (TYPE) ABAP_BOOL Set values from context 20131205
# Exception Resumable Description Created on
1 CX_FDT FDT: Abstract Exception Class 20131205

Method IMPORT_FROM_JSON Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EA_DATA Call by reference Type reference (TYPE) DATA 20131205
2 Exporting EV_CONTENT_TYPE Call by reference Type reference (TYPE) STRING 20131205
3 Exporting EV_VERSION Call by reference Type reference (TYPE) STRING 20131205
4 Importing IV_JSON Call by reference Type reference (TYPE) STRING 20131205

Method IMPORT_FROM_JSON on class CL_FDT_JSON_SERVICES has no exception.

Method JSON_TO_CONTEXT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_FUNCTION_ID Call by reference Type reference (TYPE) IF_FDT_TYPES=>ID Function ID 20131205
2 Importing IV_JSON Call by reference Type reference (TYPE) STRING 20131205
3 Importing IV_TIMESTAMP Call by reference Type reference (TYPE) IF_FDT_TYPES=>TIMESTAMP Time Stamp (active version, UTC) 20131205
4 Returning RO_CONTEXT Value transfer Object reference (TYPE REF TO) IF_FDT_CONTEXT FDT: Context 20131205
# Exception Resumable Description Created on
1 CX_FDT FDT: Abstract Exception Class 20131205

Method JSON_TO_RESULT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_FUNCTION_ID Call by reference Type reference (TYPE) IF_FDT_TYPES=>ID 20131205
2 Importing IV_JSON Call by reference Type reference (TYPE) STRING 20131205
3 Importing IV_TIMESTAMP Call by reference Type reference (TYPE) IF_FDT_TYPES=>TIMESTAMP Time Stamp (active version, UTC) 20131205
4 Returning RO_RESULT Value transfer Object reference (TYPE REF TO) IF_FDT_RESULT FDT: Result 20131205
# Exception Resumable Description Created on
1 CX_FDT FDT: Abstract Exception Class 20131205

Method RESULT_TO_JSON Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IO_RESULT Call by reference Object reference (TYPE REF TO) IF_FDT_RESULT FDT: Result 20131205
2 Importing IV_EXPORT Call by reference Type reference (TYPE) ABAP_BOOL Exportable JSON format 20131205
3 Returning RV_JSON Value transfer Type reference (TYPE) STRING 20131205
# Exception Resumable Description Created on
1 CX_FDT FDT: Abstract Exception Class 20131205
History
Last changed by/on SAP  20141121 
SAP Release Created in 740