Skip to content

Commit 1010dba

Browse files
Document JSON plugin api changes in api_changes_list_2025.md (#1725)
* Document JSON plugin api changes in api_changes_list_2025.md * api_changes_list_2025.md: Minor fixes to JSON parser change description --------- Co-authored-by: Karol Lewandowski <karol.lewandowski@jetbrains.com>
1 parent 9a8e895 commit 1010dba

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

reference_guide/api_changes_list_2025.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
1+
<!-- Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
22

33
# Incompatible Changes in IntelliJ Platform and Plugins API 2025.*
44

@@ -109,6 +109,18 @@ The `org.intellij.intelliLang` plugin requires Gradle dependency on bundled modu
109109
`org.jetbrains.plugins.cucumber.java.steps.factory.JavaStep2xDefinitionFactory` class removed
110110
: Create instances of `org.jetbrains.plugins.cucumber.java.steps.JavaAnnotatedStepDefinition` or `org.jetbrains.plugins.cucumber.java.steps.Java8StepDefinition` directly.
111111

112+
### JSON KMP-compatible parser 2025.3
113+
114+
`com.intellij.json.JsonParserDefinition.createParser(Project)` method removed
115+
: Instantiate `com.intellij.json.JsonParser` directly.
116+
117+
After porting JSON parsers to syntax-api, `com.intellij.json.JsonParserDefinition.createParser(Project)` that creates `com.intellij.lang.PsiParser` became obsolete.
118+
`com.intellij.json.JsonFileElementTypesKt#JSON_FILE` has been refactored to use syntax-api to parse JSON files, but you it is still possible to instantiate the legacy `com.intellij.json.JsonParser`.
119+
The `createParser` method can't be removed from the `com.intellij.lang.ParserDefinition` interface, so to prevent accidental usage of this method, it throws `UnsupportedOperationException` now.
120+
These changes shouldn't affect plugins that implement `ParserDefinition` on their own or that call `JsonParser` directly in any other way.
121+
However, if the plugin uses `com.intellij.psi.tree.IFileElementType(JsonLanguage.INSTANCE)` for non-JSON files, it can cause an exception to be thrown.
122+
To avoid this, instantiate `JsonParser` directly or consider using `com.intellij.platform.syntax.psi.SyntaxGrammarKitFileElementType(JsonLanguage.INSTANCE)` instead.
123+
112124
## 2025.2
113125

114126
### IntelliJ Platform 2025.2

0 commit comments

Comments
 (0)