Package io.github.astrapi69.jsonpath
Class JsonLineNumberResolver
java.lang.Object
io.github.astrapi69.jsonpath.JsonLineNumberResolver
The class
JsonLineNumberResolver
provides algorithms for resolve the line number in a
json File with a json path-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getLineNumber
(File jsonFile, String jsonPath) Gets the line number from the json file of the given json path.
-
Method Details
-
getLineNumber
Gets the line number from the json file of the given json path.- Parameters:
jsonFile
- the json filejsonPath
- the json path- Returns:
- the line number or -1 if not found or if the given json path matches more than once
- Throws:
IOException
- Signals that an I/O exception has occurred
-