Skip to content

Use JsonDocument instead of TextDocument#17

Merged
jdesrosiers merged 3 commits into
mainfrom
json-document
Jun 14, 2026
Merged

Use JsonDocument instead of TextDocument#17
jdesrosiers merged 3 commits into
mainfrom
json-document

Conversation

@jdesrosiers

Copy link
Copy Markdown
Collaborator

I figured out how to define a JsonDocument that extends TextDocument so we can add JSON-specific capabilities. The primary driver for this was that it allows the JsonDocument to handle parsing the document so each feature doesn't have to parse the document individually.

I expect we'll add more things here as we go including determining the schema that applies to the document.

@srivastava-diya srivastava-diya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JsonDocument model is very helpful having JSON specific methods like findNodeAtPointer and getParseErrors directly on the document will make hover, schema store integration, and completions much cleaner. Looking forward to building on top of this.

@jdesrosiers jdesrosiers merged commit c050946 into main Jun 14, 2026
6 checks passed
@jdesrosiers jdesrosiers deleted the json-document branch June 14, 2026 21:16
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.

2 participants