JSON is just a structure, literally it is "JavaScript Object Notation", http://json.org/.
processed internally by the bot
is basically what is going on.
The json string is parsed into an object, and based on the values of that object the bot reacts. There is no scripting involved in it. However, it is possible that some of the values are literally script in a string, which can be used in JavaScript with eval in order to execute.
I suspect that eval is not being used in that fashion though, and that the bot is simply reading key value pairs to take as instruction for example moveright:5 feet.
Here is a very quick example of taking expected commands in json and then executing them in some sort of process. The implementation is basic, just a proof of concept.
var json = '{ "actions": [ { "speak": "hello world" }, { "color" : "red" } ]}'; var obj = JSON.parse(json); var i = 0; var bot = document.querySelector("#bot"); var actions = { speak : function(text){ bot.innerText = text; }, color : function(c){ bot.style.color = c; } }; function act(action){ for(var key in action){ var value = action[key]; actions[key](value); } if(i <= obj.actions.length) setTimeout(function(){ act(obj.actions[i++]); },500); } setTimeout(function(){ act(obj.actions[i++]); },500); <div id="bot">:)</div>