Open toyg opened 10 years ago
Works fine in 2.5+ as well. Should be safe to merge :)
I was just about to pull request the same: 666d96a2cea :laughing:. Anyway, :+1:
Hmm, this doesn't seem to actually fix the issue, just avoids the infinite loop. In particular, by casting to a float you're not ensuring the Decimal value gets encoded correctly (with 8 decimal places). I think fixing this properly will require subclassing JSONEncoder - no need to round the value, though, just get it included precisely.
unicode characters in arguments get mangled up. Tested in Python 3.3.3 only.