Search code examples
jsonweb-servicesrestxml-serializationabap

Writing JSON serializer


If I want to develop a serializer for a language for which one doesnt exist already (e.g. ABAP), what could be the efforts involved in it? Does it involve merely writing "text equivalent" of ABAP serialzer - how would I tackle complex objects. What would be the best starting point for this?


Solution

  • Update: Starting with Releases 7.02 and 7.03/7.31 (kernel patch 116), JSON is supported natively in ABAP - check this blog by Horst Keller.

    You should search for ABAP and JSON using site:sap.com first and then choose one of the existing projects to learn from and contribute. However, if you're still out for the NIH bonus points, make sure you know how to use generic types, field symbols, RTTI and recursion inside out, then practice walking complex data structure recursively using RTTI. Once you've done that, assembling any kind of output string is easy.