updated encode API when precision===ENCODE_AUTO, allows both string and number input.