ABAP to JSON serializer and deserializer
An 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.
Publishes the code of SAP's standard /UI2/CL_JSON class openly, as a Z* class, Z_UI2_JSON, that a system takes in with abapGitabapGitA Git client written in ABAP that runs inside the system, so objects are cloned, pulled and pushed without leaving it; with no package manager in ABAP, a cloned repository is how code is distributed.community org, abap and uses as a local or a global class. SAP's own delivery of /UI2/CL_JSON continues; this repository is, in its words, "your way to contribute and get updates sooner", and a contribution made here "will then be integrated into the standard SAP-delivered version". The author wrote the original because they "found all implementations unsuitable for my needs for different reasons" among the other ABAP JSON libraries in SDN, and because the simple transformation available since SAP_BASIS 7.40, which the README puts first for maximal performance, "fits badly for properly handling ABAP types and name pretty-printing". The class states a minimum of SAP_BASIS 7.31, which the README puts down to an ABAP language dependency.
Facts
Where it sits
Who is behind it
In the atlas: maintains 137, wrote 14@SAPmaintainerAjinkya PatilContributes to this
In the atlas: contributes to 112@ajinkyapatil8190Alexey ArsenyevContributes to this
In the atlas: contributes to 1@alexey-arsenievGuilherme DellagustinContributes to this
In the atlas: contributes to 27@dellagustin-sapDerGuteWolfContributes to this
In the atlas: maintains 1, contributes to 5@DerGuteWolflukas-klausnerContributes to this
In the atlas: contributes to 2@lukas-klausnerMarc BernardContributes to this
In the atlas: contributes to 26@mbtools6 contributors
What it declares
Every artifact
- Type
- Package
- Origin
- By SAP
As a package
- Where it runs
- Inside its host
- Distributed through
- abapGit
Connections
Turning typed data into JSON, CSV or protobuf and back
Git client written in ABAP that runs inside the system
Download
README
quoted from SAP/abap-to-json under Apache-2.0, readABAP to JSON serializer and deserializer
About this project
This is an Open-source version of the standard /UI2/CL_JSON class, and its public documentation was previously available on the SCN wiki as "One more ABAP to JSON Serializer and Deserializer" in 2013. The official delivery of /UI2/CL_JSON will continue. The Open Source version (Z_UI2_JSON) is your way to contribute and get updates sooner using ABAP Git infrastructure.
Why
There are a lot of other implementations of the ABAP to JSON Serializer and Deserializer in SDN. Still, I found all implementations unsuitable for my needs for different reasons. From SAP_BASIS 7.40, there is also a simple transformation available for converting ABAP to JSON and JSON to ABAP. It is the best choice if you need maximal performance and do not care about serialization format, but it fits badly for properly handling ABAP types and name pretty-printing.
So, I have written my ABAP JSON serializer and ABAP JSON deserializer, which have some key differences from other implementations.
Here, you can find an Open-Source version of the standard /UI2/CL_JSON class in the form of a Z* class that you can use as a local or global one.
An original and current source version can be found in class /UI2/CL_JSON delivered with UI2 Add-on (can be applied to SAP_BASIS 740 – 76X). So, you can use this ABAP JSON parser in your standard code, mostly on any system.
The minimum required SAP_BASIS version for the class is SAP_BASIS 7.31 (ABAP language dependency, e.g., usage of "escape" function).
Alternatives
If, for some reason, the solution does not fit your purposes, there are other alternatives you may try:
- zJSON from Uwe Fetzer (aka se38)
- aJSON from Alexander Tsybulsky (aka sbcgua)
- ABAPify JSON ( ZCL_JSON )
Documentation
The Code
Requirements and Setup
Install via abapGit Eclipse plugin on ABAP cloud systems and abapGit for SAPGUI on systems with SAP_BASIS 7.57 or higher.
Support, Feedback, Contributing
This project is open to feature requests/suggestions, bug reports, etc. via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, and additional contribution information, see our Contribution Guidelines. The contribution in the Open Source version will then be integrated into the standard SAP-delivered version (/UI2/CL_JSON). You can also use Github Discussion to comment, request features, or discuss the behavior.
Code of Conduct
Members, contributors, and leaders pledge to make participation in our community a harassment-free experience. By participating in this project, you agree to always abide by its Code of Conduct.
Licensing
Copyright 2013-2025 SAP SE or an SAP affiliate company and contributors. Please see our LICENSE for copyright and license information. Detailed information, including third-party components and their licensing/copyright information, is available via the REUSE tool.
History
Others providing
Compare all 12 on the Serialisation page →- ABAP JSON APIABAP JSON APIA JSON renderer and parser for ABAP built on the standard identity transformation, adding automatic camelCase conversion and support for polymorphic arrays.independent, abapJSON renderer and parser for ABAP with camelCase conversion
- zcl_mdp_jsonzcl_mdp_jsonAn ABAP library that generates and parses JSON strings, documented in the repository's wiki rather than its README, which names no ABAP release or installation method.independent, abapABAP library generating and parsing JSON strings
- JSON2ABAPTypeJSON2ABAPTypeA generator that produces an ABAP type definition from a JSON structure, with the repository holding the code and pointing to a blog article and an SAP blog post for the rest.independent, abapGenerator of ABAP type definitions from JSON structures
- abap-protobufabap-protobufAn implementation of Protocol Buffers in ABAP, stating support for proto2 syntax only; its repository description names gRPC, which the README says nothing further about.independent, abapProtocol Buffers (proto2) implementation in ABAP
- ZASISZASISThe ABAP String Interpreter: an ABAP component that reads named field values out of an unstructured string, such as a barcode or scanner payload, through regex RuleSets configured in a Fiori app and called from ABAP or over HTTP.independent, abapRegex RuleSets that read barcode strings into named fields
- 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, abapEclipse plug-in turning JSON or XML into ABAP types and DDIC objects
- 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, abapJSON parser and serialiser for ABAP with a node tree
- sbcgua/text2tabsbcgua/text2tabA library that parses TAB-delimited text into an internal table of any flat ABAP structure, with non-strict, header and type-less modes, and serialises tables back to text in configurable formats.independent, abapParser of TAB-delimited text into ABAP internal tables and back
- ABAP JSON Encoder/DecoderABAP JSON Encoder/DecoderA JSON encoder and decoder for ABAP, modelled on Go's encoding/json package, installed through abapGit with no other required package and documentation still marked under construction.independent, abapJSON encoder and decoder for ABAP, modelled on Go's encoding/json
- ZwdCSVZwdCSVA CSV parser and generator for ABAP that follows RFC 4180, including line breaks embedded inside quoted fields, for strings and for files on the application server and the frontend.independent, abapRFC 4180 CSV parser and generator for ABAP
- ABAP CSV ManagerABAP CSV ManagerA configurable CSV reader and writer for ABAP, with per-field format, validation and column-mapping options, reading into a flat or a dynamically typed internal table.independent, abapConfigurable CSV reader and writer for ABAP
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
abaplint
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap-abap-to-json- JSON
- /artifacts/sap-abap-to-json.json
- MCP
- Connecting an agent