Code: Select all
/c game.print(game.table_to_json({math.huge}))
Code: Select all
[inf]
Possible solutions:
Error if it encounters any of these values, but that would mean we'd have to verify that there are none of these ourselves.
Output it as a string "infinity", "-infinity", "nan". I think I prefer this solution.
Output infinity as a really big value. Not sure what you'd do for nan though.
Ignore the problem entirely and force us to either: use/make a json parser that supports this, or handle these cases ourselves before exporting. If you go with this, you should probably add a note to the API doc stating this behavior.
thx