handle a json response with white space in it, fix handling of parameters with roles vs. simple indexing