json: escape strings and use {} for environment