https://github.com/sourcegraph/jsonx
Extended JSON parser and writer for Go
https://github.com/sourcegraph/jsonx
Last synced: 7 months ago
JSON representation
Extended JSON parser and writer for Go
- Host: GitHub
- URL: https://github.com/sourcegraph/jsonx
- Owner: sourcegraph
- License: other
- Created: 2017-11-22T06:51:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T15:07:13.000Z (over 3 years ago)
- Last Synced: 2025-07-03T14:18:05.132Z (7 months ago)
- Language: Go
- Size: 40 KB
- Stars: 21
- Watchers: 69
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jsonx
Package jsonx is an extended JSON library for Go. It is highly tolerant of
errors, and it supports trailing commas and comments (`//` and `/* ... */`).
It is ported from [Visual Studio Code's](https://github.com/Microsoft/vscode)
comment-aware JSON parsing and editing APIs in TypeScript, specifically in these
files:
* [src/vs/base/common/json.ts](https://github.com/Microsoft/vscode/tree/c0bc1ace7ca3ce2d6b1aeb2bde9d1bb0f4b4bae6/src/vs/base/common/json.ts)
* [src/vs/base/common/jsonEdit.ts](https://github.com/Microsoft/vscode/tree/c0bc1ace7ca3ce2d6b1aeb2bde9d1bb0f4b4bae6/src/vs/base/common/jsonEdit.ts)
* [src/vs/base/common/jsonFormatter.ts](https://github.com/Microsoft/vscode/tree/c0bc1ace7ca3ce2d6b1aeb2bde9d1bb0f4b4bae6/src/vs/base/common/jsonFormatter.ts)
## Status: Experimental
* Where the original TypeScript code's API is not idiomatic in Go, this library
does not (yet) attempt to provide an idiomatic Go API. This is mainly evident
in the error return API for parsing and scanning errors.