The reason for that exception is that your string has newline characters in it...
you can remove those with the $trim(payload)
function -- which strips off any leading and/or trailing whitespace characters.
But as Colin said, converting this long string of numbers to a numeric datatype using $number()
will cause you to lose any leading 0's, and possibly some of the trailing significant digits...
E.g. $trim("\n00384290470000000010\r\n").$number()
returns
the numeric value 384290470000000000