Groovy provides us with many useful features. One of them that is definitely worth mentioning is the N<\/strong>ative Handling of JSON<\/strong><\/span>.<\/p>\n<\/div><\/span><\/span><\/strong><\/p>\n Reading time: 3 minutes<\/em><\/span><\/strong><\/p>\n <\/p>\n In the recently published SAP PRESS E-Bite – “Developing Groovy Scripts for SAP Cloud Platform Integration”<\/a>, that I had the pleasure of writing together with Vadim Klimov<\/a>, we explained how to parse and generate JSON payloads using Groovy Scripts in CPI.<\/p>\n Many of you might be familiar with my open-source project, FormatConversionBean, that was initially available in PI<\/a> since 2015, and later ported to CPI<\/a> in 2018. JSON handling in those projects was implemented using a third-party library (https:\/\/github.com\/stleary\/JSON-java<\/a>).<\/p>\n As we invested time to look into handling JSON with Groovy, it was only natural to revisit the implementation in FormatConversionBean for CPI.<\/p>\n <\/p>\n I am pleased to say that with the latest release<\/a>, it now uses Groovy’s built-in functionality instead of depending on the third party library. As a bonus, a minor feature was added allowing JSON fields to be forced as arrays using GPath notation (another Groovy native capability). If you ever need a handy Swiss-army-knife like a tool to handle your conversion needs (XML, JSON, Excel, flat files) in CPI, check it out on GitHub<\/a>.<\/p>\n <\/p>\n Isn’t Groovy great? I think it is. And it is also feature-packed!<\/p>\n If you want to learn more, explore our E-Bite<\/strong>: https:\/\/bit.ly\/37BSL9R<\/a>.<\/p>\n <\/p>\nNative handling of JSON with Groovy<\/h3>\n
FormatConversionBean for CPI release 2.2.0<\/h3>\n
Read also<\/h4>\n