-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Labels
type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Allow the use of strings as loading or saving paths for JSON.
It maintains the original API, but allows strings to be passed in when passing in file descriptors.This makes it easy to load or save JSON files.
Just like this:
import json
data = {
"a":"b"
}
json.dump(data, "a.json") # before: json.dump(data, open("a.json","w"))
I have submitted a pull request. #126626
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
Linked PRs
Metadata
Metadata
Assignees
Labels
type-featureA feature request or enhancementA feature request or enhancement