jsona / jsona Goto Github PK
View Code? Open in Web Editor NEWJSONA parser, linter, formatter, lsp and cli.
Home Page: https://jsona.github.io/jsona/
JSONA parser, linter, formatter, lsp and cli.
Home Page: https://jsona.github.io/jsona/
Seems your project one of fastest JSON Lint/Formatter, not always does it properly for JSON, JSONC but it works very fast
I am creating all-in-one linter (yes, another one) and found your linter fastest JSON
linter/formatter.
Here benchmark repo: https://github.com/dalisoft/json-lint-benchmark
I am migrated project into JS ecosystem by using download binary
method, see at here if you want check
package-lock.json
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
| :----------------------------------------------------------------------------- | -----------: | -------: | -------: | ------------: |
| `biome check data/package-lock-test.json` | 58.9 ± 1.1 | 57.5 | 61.3 | 7.66 ± 2.10 |
| `prettier -c data/package-lock-test.json` | 180.4 ± 31.0 | 158.1 | 261.2 | 23.47 ± 7.57 |
| `dprint check data/package-lock-test.json` | 199.5 ± 7.1 | 191.8 | 213.3 | 25.96 ± 7.15 |
| `jsona fmt --option trailing_newline=true --check data/package-lock-test.json` | 7.7 ± 2.1 | 6.2 | 13.3 | 1.00 |
| `spectral lint --ignore-unknown-format data/package-lock-test.json` | 394.4 ± 17.5 | 379.0 | 426.9 | 51.33 ± 14.19 |
package.json
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
| :---------------------------------------------------------------------------- | -----------: | -------: | -------: | -------------: |
| `biome check data/package-template.json` | 49.7 ± 0.9 | 48.2 | 50.7 | 17.58 ± 4.09 |
| `prettier -c data/package-template.json` | 115.4 ± 11.0 | 108.9 | 143.2 | 40.85 ± 10.25 |
| `dprint check data/package-template.json` | 201.5 ± 33.1 | 188.4 | 295.6 | 71.30 ± 20.29 |
| `jsona fmt --option trailing_newline=true --check data/package-template.json` | 2.8 ± 0.7 | 2.0 | 4.2 | 1.00 |
| `spectral lint --ignore-unknown-format data/package-template.json` | 373.7 ± 31.3 | 359.1 | 460.9 | 132.28 ± 32.65 |
There linked issue/discussions:
Here example of bug
Name | Version |
---|---|
jsona-cli |
0.6.0 |
jsona-vscode |
0.4.5 |
{
"url": "http://t.co/QMLJeFmfMT",
"expanded_url": "http://www.pixiv.net/member.php?id=4776",
"display_url": "pixiv.net/member.php?id=…",
- "indices": [58,80]
+ "indices": [58, 80]
},
See diff above
I am seeing a lot of diff's like the following in files which were emitted from serde
- { "x": 0.0, "y": 0.0 },
- { "x": 0.0, "y": 1.0 },
- { "x": 1.0, "y": 1.0 },
- { "x": 1.0, "y": 0.0 }
+ {"x":0.0,"y":0.0},
+ {"x":0.0,"y":1.0},
+ {"x":1.0,"y":1.0},
+ {"x":1.0,"y":0.0}
Would be nice if there was an option to add this whitespace for greater readability and compatibility with serde-json.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.