json-source-map icon indicating copy to clipboard operation
json-source-map copied to clipboard

Parse/stringify JSON and provide source-map for JSON-pointers to all nodes - supports BigInt, Maps, Sets and Typed arrays

Results 9 json-source-map issues
Sort by recently updated
recently updated
newest added

When utilizing json-source-map to validate JSON - I wanted to display invalid JSON errors to the user at the specific line at which it occurred, but noticed that the syntax...

Thank you for this library! While reading through the README, I noticed a small typo - this PR fixes that

now users must append `jsonMap.leaf_node` to their `keyList` like ```js const jsonMap = require('json-source-map'); const result = jsonMap.parse('{"z":1,"a":{"z":1,"a":1}}'); const keyList = ['z', 'a']; // before this was ptr = '/z/a'...

For my usecase, I need to modify the default tab width. I have added a `tabWidth` option to `parse` and `stringify`, added a test and documentation to the readme.

I recently wanted to utilize this in a TypeScript project and wanted to share and include the types into the project. By adding these types you can import this library...

It'd be great if this project supported [jsonc](https://code.visualstudio.com/docs/languages/json#_json-with-comments). :) **Changes** - Added option `jsonc` which when set true will do the following: - Add support for jsonc containing code comments...

It would be really great if this project supported `jsonc` comments within json parsing. I know there are other packages available which provide `jsonc` support already with support for mapping...

Hi @epoberezkin , would it be possible to provide an ES module version of `json-source-map`, alongside the CommonJS code?