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
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-jsonABAP to JSON serializer and deserializerAn open-source Z* version of SAP's standard /UI2/CL_JSON class, which serialises ABAP data to JSON and reads it back, installed with abapGit and needing SAP_BASIS 7.31 or later.sap official, abap 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.
Parsers that keep JSON as a tree to read and change in parts, such as ajsonajsonA JSON parser and serialiser for ABAP that parses into a flexible, unstructured node tree rather than a fixed target structure, converting to one only when asked through to_abap.independent, abap, generators of ABAP type definitions from a JSON sample, among them the Eclipse plug-in abap-architectABAP ArchitectAn Eclipse plug-in that generates ABAP type definitions and parsing code from a pasted JSON or XML sample and creates the matching DDIC objects in a connected system over ADT.independent, abap that also writes XML parsing code and the DDIC objects over ADT, CSV and tab-delimited readers into typed tables, and a proto2 encoder.
Artifacts
Content
Details
Coverage
For your agent
- Ref
capability:serialisation- JSON
- /capabilities/serialisation.json
- MCP
- Connecting an agent