first version of JSON parsing in machine script