Skip to content

Return error when JSON-marshaling NaN or Infinity floats

Compare
Choose a tag to compare
@guregu guregu released this 14 Dec 15:56

If you try to JSON marshal Infinity or NaN, you'll get *encoding/json.UnsupportedValueError. This brings us in line with the standard library.