You were a bit overambitious with the indentation handling:
Standards.JSON.encode(({1,2,3,Int.NATIVE_MAX + 1}), 2);
(2) Result: "[\n" " 1,\n" " 2,\n" " 3,\n" " 9223372036854775808\n" "]"
It's better to not do anything there. I changed it to an alias for mpzmod_get_string.