-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a load_file
method like YAML's
#386
Comments
keithrbennett
added a commit
to keithrbennett/json
that referenced
this issue
Oct 22, 2019
keithrbennett
added a commit
to keithrbennett/json
that referenced
this issue
Oct 24, 2019
keithrbennett
added a commit
to keithrbennett/json
that referenced
this issue
Jun 25, 2020
keithrbennett
added a commit
to keithrbennett/json
that referenced
this issue
Jun 25, 2020
keithrbennett
added a commit
to keithrbennett/json
that referenced
this issue
Jun 25, 2020
keithrbennett
added a commit
to keithrbennett/json
that referenced
this issue
Jun 30, 2020
hsbt
added a commit
that referenced
this issue
Jun 30, 2020
Add `load_file` and `load_file!` methods, with tests. Fixes issue #386.
#387 was merged now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One very common use case is to need to parse the contents of a JSON file.
As far as I know, this can only be accomplished in 2 steps, e.g.
JSON.parse(File.read('something.json'))
.YAML provides a convenient
load_file
method that combines these two. Obviously, it is trivially simple to implement.Could we get a similar method (preferably with the same name) in this JSON library?
The text was updated successfully, but these errors were encountered: