// Path: json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
// public static DocumentContext parse(Object json) {
//     return new ParseContextImpl().parse(json);
// }
// 
// Path: json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
// public static ParseContext using(Configuration configuration) {
//     return new ParseContextImpl(configuration);
// }


import jakarta.json.JsonObject;
import jakarta.json.JsonString;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import static com.jayway.jsonpath.JsonPath.parse;
import static com.jayway.jsonpath.JsonPath.using;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Collections.emptyMap;
import static org.assertj.core.api.Assertions.assertThat;

        List<Integer> result = using(JAKARTA_JSON_RW_CONFIGURATION).parse(o)
        		.read(updatePathFunction, new TypeRef<List<Integer>>() {});

        assertThat(result).containsExactly(1, 1, 1, 1);
    }

    @Test
    public void a_path_can_be_deleted() {
    	final String deletePath = "$.store.book[*].display-price";
    	Object o = using(JAKARTA_JSON_RW_CONFIGURATION)
        		.parse(JSON_DOCUMENT)
        		.delete(deletePath)
        		.json();

        List<Integer> result = using(JAKARTA_JSON_RW_CONFIGURATION).parse(o)
        		.read(deletePath, new TypeRef<List<Integer>>() {});

        assertThat(result).isEmpty();
    }

    @Test
    public void operations_can_chained() {
    	Object o = using(JAKARTA_JSON_RW_CONFIGURATION)
        		.parse(JSON_DOCUMENT)
                .delete("$.store.book[*].display-price")
                .set("$.store.book[*].category", "A")
                .json();

        List<Integer> prices = using(JAKARTA_JSON_RW_CONFIGURATION).parse(o)
        		.read("$.store.book[*].display-price", new TypeRef<List<Integer>>() {});

// Path: json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
// public static DocumentContext parse(Object json) {
//     return new ParseContextImpl().parse(json);
// }
// 
// Path: json-path/src/main/java/com/jayway/jsonpath/JsonPath.java
// public static ParseContext using(Configuration configuration) {
//     return new ParseContextImpl(configuration);
// }


// Path: json-path/src/test/java/com/jayway/jsonpath/JakartaJsonProviderTest.java
import jakarta.json.JsonObject;
import jakarta.json.JsonString;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import static com.jayway.jsonpath.JsonPath.parse;
import static com.jayway.jsonpath.JsonPath.using;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Collections.emptyMap;
import static org.assertj.core.api.Assertions.assertThat;

        List<Integer> result = using(JAKARTA_JSON_RW_CONFIGURATION).parse(o)
        		.read(updatePathFunction, new TypeRef<List<Integer>>() {});

        assertThat(result).containsExactly(1, 1, 1, 1);
    }

    @Test
    public void a_path_can_be_deleted() {
    	final String deletePath = "$.store.book[*].display-price";
    	Object o = using(JAKARTA_JSON_RW_CONFIGURATION)
        		.parse(JSON_DOCUMENT)
        		.delete(deletePath)
        		.json();

        List<Integer> result = using(JAKARTA_JSON_RW_CONFIGURATION).parse(o)
        		.read(deletePath, new TypeRef<List<Integer>>() {});

        assertThat(result).isEmpty();
    }

    @Test
    public void operations_can_chained() {
    	Object o = using(JAKARTA_JSON_RW_CONFIGURATION)
        		.parse(JSON_DOCUMENT)
                .delete("$.store.book[*].display-price")
                .set("$.store.book[*].category", "A")
                .json();

        List<Integer> prices = using(JAKARTA_JSON_RW_CONFIGURATION).parse(o)
        		.read("$.store.book[*].display-price", new TypeRef<List<Integer>>() {});

        List<String> categories = using(JAKARTA_JSON_RW_CONFIGURATION).parse(o)
