Skip to content

feat: make newJSONDocument and JSONDocument consistent#259

Merged
aeschli merged 1 commit intomicrosoft:mainfrom
nanokind:feature/new-json-document-comments
Apr 25, 2025
Merged

feat: make newJSONDocument and JSONDocument consistent#259
aeschli merged 1 commit intomicrosoft:mainfrom
nanokind:feature/new-json-document-comments

Conversation

@nanokind
Copy link
Copy Markdown
Contributor

I'd like to implement my own JSON parser, and reuse the newJSONDocument from vscode-json-languageservice. But newJSONDocument signature is not consistent with internal JSONDocument.

There are two restrictions:

  1. newJSONDocument doesn't allow rootNode to be undefined(rootNode is typed with ASTNode)
  2. newJSONDocument doesn't accept comments(defaults to [] internally)

This PR updates the newJSONDocument signature to solve these two restrictions.

@vs-code-engineering vs-code-engineering bot added this to the April 2025 milestone Apr 25, 2025
@aeschli aeschli merged commit bec491f into microsoft:main Apr 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants