now using json generator to escape stuff