[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-17 Thread Varun Agrawal
Change by Varun Agrawal : -- pull_requests: +14624 pull_request: https://github.com/python/cpython/pull/14832 ___ Python tracker ___ ___

[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add support to load from paths to json.load ___ Python tracker

[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-17 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This looks similar to issue36378 which was rejected and has a link to previous mailing list discussion. -- nosy: +xtreak ___ Python tracker __

[issue37615] json - make load and dump work with filenames and path-like objects

2019-07-17 Thread Varun Agrawal
New submission from Varun Agrawal : Currently, json.load and json.dump take file pointers, aka file-like objects which have support for `.write()` and `.read()`. This necessitates the following pattern of code on a regular basis: ``` with open(filename) as f: o = json.load(f) ... with ope