Skip to content

Provide a load_file method like YAML's #386

@keithrbennett

Description

@keithrbennett

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions