minor tweak to improve performance of JSON conversion