JSON - add specific long encoding method

follow up to eeeef283, fixes test breakage when long encoded as double