b1295
Complex literals cannot be serialised directly to JSON, but Python's AST reports them as constant numeric values. Ruby's `to_json` method serialies complex numbers to their string representations, so we do similar here. An alternative would be to serialise to a two-element list of the real and imaginary parts.