Serialisation

Turning typed in-memory data into a text or binary format such as JSON, CSV or protobuf and reading it back, including the mapping of names and types the language does not do for you. The protocol that carries the payload is a separate concern: an HTTP or OData client moves the bytes, and serialisation decides what they say.

Overview

SAP SHIPS

The identity transformation ID converts ABAP data to and from asJSON, the sXML library reads and writes JSON through JSON-XML, and /UI2/CL_JSON serialises and deserialises in one call. SAP's list of released classes adds XCO_CP_JSON for JSON and CL_CSV_FACTORY for writing CSV.

Not covered: At JSON, XML and writing CSV. Reading CSV, tab-delimited text and protobuf are not among the classes that list names, and asJSON writes ABAP's own names and types, so a payload shaped by someone else needs a mapping on top.

abap-to-json is SAP's open-source copy of /UI2/CL_JSON, published so that fixes arrive ahead of the UI2 add-on while the official delivery continues. How the independent libraries relate to the core classes has not been assessed.

THE COMMUNITY ADDS

Parsers that keep JSON as a tree to read and change in parts, such as ajson, generators of ABAP type definitions from a JSON sample, among them the Eclipse plug-in abap-architect that also writes XML parsing code and the DDIC objects over ADT, CSV and tab-delimited readers into typed tables, and a proto2 encoder.

Artifacts12

12 of 12 artifacts
ArtifactSignals
Generators1
JSON2ABAPTypeGenerator of ABAP type definitions from JSON structures
Signals
none
IDE extensions1
ABAP ArchitectEclipse plug-in turning JSON or XML into ABAP types and DDIC objects
Signals
Functional boundary
Packages10
ABAP CSV ManagerConfigurable CSV reader and writer for ABAP
Signals
none
ABAP JSON APIJSON renderer and parser for ABAP with camelCase conversion
Signals
none
ABAP JSON Encoder/DecoderJSON encoder and decoder for ABAP, modelled on Go's encoding/json
Signals
Quiet
ABAP to JSON serializer and deserializerOpen-source Z* version of /UI2/CL_JSON for ABAP to JSON
Signals
none
abap-protobufProtocol Buffers (proto2) implementation in ABAP
Signals
none
ajsonJSON parser and serialiser for ABAP with a node tree
Signals
none
sbcgua/text2tabParser of TAB-delimited text into ABAP internal tables and back
Signals
none
ZASISRegex RuleSets that read barcode strings into named fields
Signals
Functional boundary
zcl_mdp_jsonABAP library generating and parsing JSON strings
Signals
Quiet
ZwdCSVRFC 4180 CSV parser and generator for ABAP
Signals
none

Content1

Group by
Piece, what it offers
SAP CI to ABAP Integration: Seamless XML to Internal Table Mapping
SAP Community, Ravi_Bharti08, Blog

Details

Coverage
statecore and community, ABAP
assessed
relationshipunassessed
For your agent
Ref
capability:serialisation
JSON
/capabilities/serialisation.json
MCP
Connecting an agent