Webservices Json

I should read the data collected in the JSON file received from a Barcode reader/ RFID Reader each 10 seconds. Json file shall be inserted / updated in tables in my Database.
My problem is using Scriptcase macro in my webservice application.
I need some suggestion if there is .
Thanks!

I would not use scriptcase for this.
Why not a php script run under cron ?

Create a blank application that receives the json string in $_get or $_post. Then simply process it.

Thanks aducom, is there any simple samples?

Thanks aducom, is there any simple samples?

If you need to do it in a cron, then use a blank application that reads the json file and parses it. I assume that you know how to do that. I don’t know how many records are in that file, but generic, if the reader creates new files you might need to rename it so that the reader writes in one file while you process the other. You can’t have that the file needs to be in use by two processes at the same time.

If the reader is able to send get or post messages then I would go for the message approach as you don’t need a cron. Just assign the $_GET or $_POST to a variable that you parser (see json_decode function).
In the onExecute it’s just $myvars=$_GET the variable you receive.

If you are sure about the data then no further action is required, but I always sanitize my date. Up to you.

Hope this helps.

Thanks for your help. We have used a blank application and with a php application we have read the Json file. All data were parsed correctly and inserted in the relative table.
Thanks for your suggestion.