Skip to content

Why JSON3.read is used both for file path and json string content, and blocks file after read? #272

@sairus7

Description

@sairus7

Because of this I get read error for any non-existent file, and maybe some incorrect behaviour for file names that match JSON

using JSON3
JSON3.read("123") # is it file or value? now its a value
open("123", "w") do io
    write(io, """
    {
        "some":"data"
    }
    """)
end
JSON3.read("123") # but now this is file
rm("123") # unlink("123"): permission denied (EACCES)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions