Comments (6)
I guess this is a JSON issue, and not a jsonlint
issue, but maybe we should switch to the npm-installable one:
± cat test.json
{
"one": "value",
"two": 2,
"three": "three",
}
± jsonlint -c test.json
test.json: line 4, col 19, found: '}' - expected: 'STRING'.
from lint-review.
I can't see public access to the source for demjson
or a public issue tracker either.
from lint-review.
Seems legit:
$ jsonlint -c has_errors.json
has_errors.json: line 1, col 0, found: 'INVALID' - expected: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['.
$ jsonlint -c has_warnings.json
has_warnings.json: line 2, col 8, found: 'INVALID' - expected: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['.
$ jsonlint -c no_errors.json
{
"one": "value",
"two": 2
}
from lint-review.
I take that back.
The errors are definitely not as pretty, and it doesn't have have warnings. The npm one hasn't been updated in two years.
± jsonlint -c -s tests/fixtures/jsonlint/has_warnings.json
tests/fixtures/jsonlint/has_warnings.json: line 2, col 8, found: 'INVALID' - expected: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['.
± virtualenv/bin/jsonlint tests/fixtures/jsonlint/has_warnings.json
tests/fixtures/jsonlint/has_warnings.json:2:9: Warning: String literals must use double quotation marks in strict JSON
| At line 2, column 9, offset 11
tests/fixtures/jsonlint/has_warnings.json:3:12: Warning: JSON does not allow identifiers to be used as strings: u'three'
| At line 3, column 12, offset 32
tests/fixtures/jsonlint/has_warnings.json:3:28: Warning: Strict JSON does not allow a final comma in an object (dictionary) literal
| At line 3, column 28, offset 48
| Object started at line 1, column 0, offset 0 (AT-START)
tests/fixtures/jsonlint/has_warnings.json: ok, with warnings
from lint-review.
Looking at how Yelp's pre-commit does checking if JSON is correct and compares it to pretty formatted JSON, maybe we should do this ourselves?
Though I guess as a standalone library?
from lint-review.
@zoidbergwill If you build a tool that can be integrated with lintreview, we could switch tools
from lint-review.
Related Issues (20)
- Suddenly stopped working HOT 2
- Lint riview not working
- Installing GitHub hooks via Docker after settings configuration doesn't work HOT 2
- Linting fails when previous lint job hasn't finished HOT 2
- Add ESLint HTML plugin to package.json HOT 1
- Support linting R HOT 3
- Source file not found HOT 19
- Gunicorn is getting 404 errors HOT 15
- Unable to connect Sticker CI to an organization repo HOT 4
- Use the flake8 config file HOT 5
- Flake8 linter is missing a usage of typing.List HOT 8
- Add support for kotlin lint HOT 1
- Create a 'Deploy to Heroku' Button
- Can you please tell me where to put the config file for tslint HOT 4
- Gunicorn returns 404 HOT 3
- Add support for C/C++ Linter HOT 3
- Add support for HTML HOT 4
- Can this project be run without RabbitMQ & Celery but with Waitress? HOT 2
- Could not publish job to celery. Make sure its running.
- Celery JSON serializer errors out when using Python3.6+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lint-review.