json output minor optimalization