Message247005
This is effecting IronPython as well, because .NET objects return copies not references. If a .NET assembly method is called from IronPython, its return is a copy, not a reference. Therefore the reference of a boolean return is not the same as the internal Python reference for that boolean, and the JSON encoder doesn't recognize the value as a boolean, but instead treats it as an integer, and returns `str(o)`, which for `True` is "True" and for `False` is "False". Then the decoder can't interpret the JSON object because true and false are capitalize, which is not in its spec. :(
See my comment https://github.com/IronLanguages/main/issues/1033.
The patch would solve this problem. A copy of a boolean will be equal to its value, ie False == False even if their references are not the same. |
|
Date |
User |
Action |
Args |
2015-07-20 21:56:59 | bwanamarko | set | recipients:
+ bwanamarko, georg.brandl, rhettinger, bob.ippolito, mark.dickinson, ggenellina, techtonik, ezio.melotti, eric.araujo, r.david.murray, flox, chris.jerdonek, amirouche, serhiy.storchaka, zearin |
2015-07-20 21:56:59 | bwanamarko | set | messageid: <1437429419.44.0.452081549447.issue4945@psf.upfronthosting.co.za> |
2015-07-20 21:56:59 | bwanamarko | link | issue4945 messages |
2015-07-20 21:56:58 | bwanamarko | create | |
|