Skip to content

jsonlint.parse(PATH) not working #110

Open
@CADBOT

Description

@CADBOT

I didn't see it explicitly mentioned in the docs, but I could have swore the module interface used to take a valid file path or a json string. Perhaps not though (I would be willing to attempt a PR with the feature if interested).

Here is an example

ex.json

{
    "hi": 2
}

app.js

const jsonlint = require('jsonlint');
jsonlint.parse('./ex.json');

Also the README questions why one would ever use this module instead of JSON.parse? I'd say it's worthwhile because this module gives more user friendly error messages for malformed json files than JSON.parse :)

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