Package io.github.astrapi69.json
Class JsonLineNumberResolver
- java.lang.Object
-
- io.github.astrapi69.json.JsonLineNumberResolver
-
public final class JsonLineNumberResolver extends java.lang.ObjectThe classJsonLineNumberResolverprovides algorithms for resolve the line number in a json File with a json path
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetLineNumber(java.io.File jsonFile, java.lang.String jsonPath)Gets the line number from the json file of the given json path.
-
-
-
Method Detail
-
getLineNumber
public static int getLineNumber(java.io.File jsonFile, java.lang.String jsonPath) throws java.io.IOExceptionGets 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:
java.io.IOException- Signals that an I/O exception has occurred
-
-