Currently, when we receive a `float('inf')`, the serializer respects the RFC standard and transforms it into a null value. However, python returns '-Infinity' , 'Infinity' and 'NaN' if `allow_nan` is `true` : https://docs.python.org/3.8/library/json.html#infinite-and-nan-number-values Selected Assignee: @samuelcolvin