[issue36841] Supporting customization of float encoding in JSON

2021-09-30 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36841] Supporting customization of float encoding in JSON

2021-09-30 Thread Min RK
Min RK added the comment: We just ran into this in Jupyter where we've removed a pre-processing step for data structures passed to json.dumps, which took care of this, but was expensive https://github.com/jupyter/jupyter_client/pull/706 My expectation was that our `default` would be called f

[issue36841] Supporting customization of float encoding in JSON

2021-09-30 Thread Min RK
Change by Min RK : -- nosy: +minrk nosy_count: 5.0 -> 6.0 pull_requests: +27016 pull_request: https://github.com/python/cpython/pull/28648 ___ Python tracker ___ __

[issue36841] Supporting customization of float encoding in JSON

2021-05-10 Thread Éric Araujo
Éric Araujo added the comment: I think this should be discussed on the mailing list or Discourse, to get use cases and needs. -- nosy: +eric.araujo versions: +Python 3.11 -Python 3.8 ___ Python tracker _

[issue36841] Supporting customization of float encoding in JSON

2019-05-13 Thread Wei Lee
Wei Lee added the comment: I've sent a PR for it. https://github.com/python/cpython/pull/13233 -- ___ Python tracker ___ ___ Python

[issue36841] Supporting customization of float encoding in JSON

2019-05-09 Thread Wei Lee
Change by Wei Lee : -- keywords: +patch pull_requests: +13143 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue36841] Supporting customization of float encoding in JSON

2019-05-08 Thread Mitar
Mitar added the comment: That would be awesome! BTW, just as an additional example, JavaScrpt's JSON.stringify encodes NaN and Infinity to null. By having a custom function I could for example try to match such implementation. -- ___ Python track

[issue36841] Supporting customization of float encoding in JSON

2019-05-08 Thread Wei Lee
Wei Lee added the comment: If no one is working on it, I'd like to give it a try. -- nosy: +Lee-W ___ Python tracker ___ ___ Python

[issue36841] Supporting customization of float encoding in JSON

2019-05-07 Thread SilentGhost
Change by SilentGhost : -- nosy: +ezio.melotti, rhettinger type: -> enhancement versions: +Python 3.8 ___ Python tracker ___ ___ Py

[issue36841] Supporting customization of float encoding in JSON

2019-05-07 Thread Mitar
New submission from Mitar : Currently, there is only one argument which allows customization how float numbers are encoded in JSON: allow_nan. But this does not allow one to hook into the encoding of floating points really. The JSONEncoder is not called for float numbers. The motivation here