Anyone familiar with StreamingJsonBuilder

I’m searching for best library to send json data directly as part of katalon keyword.
Ealier I’m using jsonbuilder excel data file but I found its not efficient to my prj as we need to change test data or data structure frequently.
Since I have already set of test data created by tester when they use it at postman.
I’m thinking to just copy the data directly to kalatalon keyword file.
It seems StreamingJsonBuilder is good but I’m unsure.
Seeking advise from people, please share your experiences.

Can you post a sample of your json template and what is needed to be changed every time?
If the structure is same, but only the values has to be updated, could be a good job for groovy’s SimpleTemplate engine

The structure that you asked I guess is json structure? It is same.
But key/properties field might different as per function. Of course value also different.
Samples, note that I type them using mobile phone without checking if json formatted correctly or not. Basically the application supported 5 different sendcommands like add, delete, update… Etc.
Function to add
{
“client” : “test client”,
“Commands” [
{
“sendcommand” : “add”,
“Item” : {
itemid : item123,
Itemname : item test name one
}
}
]
}

Function to delete item
{
“client” : “test client”,
“Commands” [
{
“sendcommand” : “delete”,
“Item” : {
itemid : item123
}
}
]
}

So the data like above likely won’t changed much, if I write a new keyword for each sendcommands. Total 5 keywords, then the json payload like above I could paste them as part of keyword. Only when the value need to update or maybe when new property field added to the sendcommand, I will paste new set of json payload into keyword file.
I just want to get rid of data file, jsonbuilder to split field, then reconstruct them again.
As the data changes even structure changes frequency is not high.

Oh I did research simpletemplate engine quickly, the format isn’t same as the json data I used currently.
What I wanted is, I don’t have to restructure reconstruct the data when I write katalon script, as I already have test data from tester who did many testing manually. I just need to paste them into script.

Kindly use also code formatt when you post sample code/logs

Sorry I did not see any options at mobile when typing at editor.

since also the structure (key’s) can change, you can use JsonOutput to build the json dynamically from a map object.
see:
https://groovy-lang.org/json.html

For better control over the produced json, you can use also JsonGenerator