Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Release 3.0.1
* Fix: Validates whether the whole string has been consumed

# Release 3.0.0
* BREAKING CHANGES:
* Removed template type from `JsonPathFunctionExtension`
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kotlin.native.ignoreDisabledTargets=true
# workaround dokka bug (need to wait for next snapshot build)
org.jetbrains.dokka.classpath.excludePlatformDependencyFiles=true

artifactVersion = 3.0.0
artifactVersion = 3.0.1
jdk.version=17

android.experimental.lint.version=8.5.0
Expand Down
2 changes: 1 addition & 1 deletion jsonpath4k/src/commonMain/antlr/JsonPathParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parser grammar JsonPathParser;

options { tokenVocab=JsonPathLexer; }

jsonpath_query : rootIdentifier segments;
jsonpath_query : rootIdentifier segments EOF;
segments : (ws segment)*;
segment : bracketed_selection | SHORTHAND_SELECTOR shorthand_segment | DESCENDANT_SELECTOR descendant_segment;
shorthand_segment : wildcardSelector | memberNameShorthand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package at.asitplus.jsonpath

import at.asitplus.jsonpath.core.JsonPathFilterExpressionType
import at.asitplus.jsonpath.core.JsonPathFunctionExtension
import at.asitplus.jsonpath.implementation.JsonPathParserException
import at.asitplus.jsonpath.implementation.JsonPathTypeCheckerException
import io.kotest.assertions.throwables.shouldNotThrowAny
import io.kotest.assertions.throwables.shouldThrow
Expand Down Expand Up @@ -1244,5 +1245,13 @@ class JsonPathUnitTest : FreeSpec({
}
}
}

"RMLTC0002g-JSON" - {
"$.students[*]]" {
shouldThrow<JsonPathParserException> {
JsonPath(this.testScope.testCase.name.originalName)
}
}
}
}
})
Loading