Averroes / simplejson

MIT License
0 stars 0 forks source link

use_decimal argument doesn't work with dump() #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call: simplejson.dump(Decimal('12312.234234'), StringIO(), use_decimal=True)

What is the expected output? What do you see instead?
I expect a JSON blob to be written to the StringIO instance. Instead, I get a 
TypeError.

What version of the product are you using? On what operating system?
2.1.1 & 2.1.2 on MacOS & Linux.

Please provide any additional information below.
simplejson.dumps() works fine. Testcase exercising the dump/load functions with 
& without use_decimal is attached.

Original issue reported on code.google.com by i...@simplegeo.com on 15 Jan 2011 at 1:33

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r241 and I plan to release 2.1.3 today. Didn't use the test cases 
as-is because of the license at the top, but integrated a similar failing test 
into the existing test_decimal case.

Original comment by bob.ippo...@gmail.com on 17 Jan 2011 at 1:30

GoogleCodeExporter commented 9 years ago
It's not a license, it's a declaration of copyright. If you wish to use the 
code, I would be happy to provide amenable licensing terms.

Original comment by i...@simplegeo.com on 17 Jan 2011 at 2:44

GoogleCodeExporter commented 9 years ago
Thanks, but don't need it. r241 includes sufficient testing to cover this case.

Original comment by bob.ippo...@gmail.com on 17 Jan 2011 at 2:52