eliminated a string copy when generating json data