File tree 2 files changed +3
-1
lines changed
src/main/kotlin/com/nfeld/jsonpathlite
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ class JsonPath(path: String) {
91
91
* @throws JSONException
92
92
*/
93
93
@Throws(JSONException ::class )
94
+ @JvmStatic
94
95
fun parse (jsonString : String ): JsonResult = when {
95
96
jsonString.isEmpty() -> throw JSONException (" JSON string is empty" )
96
97
jsonString.first() == ' {' -> JsonObject (JSONObject (jsonString))
@@ -103,6 +104,7 @@ class JsonPath(path: String) {
103
104
* @param jsonString JSON string to parse
104
105
* @return instance of parsed [JsonResult] object or null
105
106
*/
107
+ @JvmStatic
106
108
fun parseOrNull (jsonString : String ): JsonResult ? {
107
109
return jsonString.firstOrNull()?.run {
108
110
try {
Original file line number Diff line number Diff line change 1
1
package com.nfeld.jsonpathlite
2
2
3
- object PathCompiler {
3
+ internal object PathCompiler {
4
4
5
5
/* *
6
6
* @param path Path string to compile
You can’t perform that action at this time.
0 commit comments