I\'m testing an app called Barcode Scanner Terminal for my business; I\'m looking to use it as a replacement of sorts for a timeclock.
Employees can scan a barcode or QR
It seems to me that you may well be able to access the value of "batch" directly as a part of the form scope. Assuming of course you are really receiving a post request.
So you may well be able to just do:
<cfif isDefined("form.batch")>
<cfset aData = deSerializeJSON(trim(form.batch))>
<cfdump var="#aData#">
</cfif>
So no need to look at the request body and no need to decode the response.
You either need to strip off the "batch=" or pass the entire thing into "evaluate()" which will set the array literal into a variable called batch. I would recommend the former option since the second could be exploited by malicious CFML content in the string.
<cfset arrayOfStructs = deserializeJson( replaceNoCase( decodedBody, "batch=", "" ) )>