diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/split.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/split.kt index 10291745f8..56fa8d23ab 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/split.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/split.kt @@ -1,5 +1,6 @@ package org.jetbrains.kotlinx.dataframe.api +import org.intellij.lang.annotations.Language import org.jetbrains.kotlinx.dataframe.AnyFrame import org.jetbrains.kotlinx.dataframe.ColumnsSelector import org.jetbrains.kotlinx.dataframe.DataColumn @@ -111,7 +112,9 @@ internal fun Split.by( // region match -public fun Split.match(regex: String): SplitWithTransform = match(regex.toRegex()) +public fun Split.match( + @Language("RegExp") regex: String, +): SplitWithTransform = match(regex.toRegex()) public fun Split.match(regex: Regex): SplitWithTransform = by { diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt index c9448fabdb..ccb73d6e20 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/json.kt @@ -4,6 +4,7 @@ import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.json.Json import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.decodeFromStream +import org.intellij.lang.annotations.Language import org.jetbrains.kotlinx.dataframe.AnyFrame import org.jetbrains.kotlinx.dataframe.AnyRow import org.jetbrains.kotlinx.dataframe.DataFrame @@ -254,7 +255,7 @@ public fun DataRow.Companion.readJson( @Refine @Interpretable("ReadJsonStr") public fun DataFrame.Companion.readJsonStr( - text: String, + @Language("json") text: String, header: List = emptyList(), keyValuePaths: List = emptyList(), typeClashTactic: TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, @@ -269,7 +270,7 @@ public fun DataFrame.Companion.readJsonStr( * @return [DataRow] from the given [text]. */ public fun DataRow.Companion.readJsonStr( - text: String, + @Language("json") text: String, header: List = emptyList(), keyValuePaths: List = emptyList(), typeClashTactic: TypeClashTactic = ARRAY_AND_VALUE_COLUMNS,