Package org.apache.johnzon.core
Class JsonPatchBuilderImpl
- java.lang.Object
-
- org.apache.johnzon.core.JsonPatchBuilderImpl
-
- All Implemented Interfaces:
jakarta.json.JsonPatchBuilder
class JsonPatchBuilderImpl extends Object implements jakarta.json.JsonPatchBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private List<JsonPatchImpl.PatchValue>
operations
private jakarta.json.spi.JsonProvider
provider
-
Constructor Summary
Constructors Constructor Description JsonPatchBuilderImpl(jakarta.json.spi.JsonProvider provider)
JsonPatchBuilderImpl(jakarta.json.spi.JsonProvider provider, jakarta.json.JsonArray initialData)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.json.JsonPatchBuilder
add(String path, boolean value)
jakarta.json.JsonPatchBuilder
add(String path, int value)
jakarta.json.JsonPatchBuilder
add(String path, jakarta.json.JsonValue value)
jakarta.json.JsonPatchBuilder
add(String path, String value)
private jakarta.json.JsonPatchBuilder
addOperation(JsonPatchImpl.PatchValue operation)
jakarta.json.JsonPatch
build()
jakarta.json.JsonPatchBuilder
copy(String path, String from)
jakarta.json.JsonPatchBuilder
move(String path, String from)
jakarta.json.JsonPatchBuilder
remove(String path)
jakarta.json.JsonPatchBuilder
replace(String path, boolean value)
jakarta.json.JsonPatchBuilder
replace(String path, int value)
jakarta.json.JsonPatchBuilder
replace(String path, jakarta.json.JsonValue value)
jakarta.json.JsonPatchBuilder
replace(String path, String value)
jakarta.json.JsonPatchBuilder
test(String path, boolean value)
jakarta.json.JsonPatchBuilder
test(String path, int value)
jakarta.json.JsonPatchBuilder
test(String path, jakarta.json.JsonValue value)
jakarta.json.JsonPatchBuilder
test(String path, String value)
private static jakarta.json.JsonValue
toJsonBoolean(boolean value)
private static jakarta.json.JsonValue
toJsonNumber(int value)
private static jakarta.json.JsonValue
toJsonString(String value)
-
-
-
Field Detail
-
provider
private final jakarta.json.spi.JsonProvider provider
-
operations
private final List<JsonPatchImpl.PatchValue> operations
-
-
Method Detail
-
add
public jakarta.json.JsonPatchBuilder add(String path, jakarta.json.JsonValue value)
- Specified by:
add
in interfacejakarta.json.JsonPatchBuilder
-
add
public jakarta.json.JsonPatchBuilder add(String path, String value)
- Specified by:
add
in interfacejakarta.json.JsonPatchBuilder
-
add
public jakarta.json.JsonPatchBuilder add(String path, int value)
- Specified by:
add
in interfacejakarta.json.JsonPatchBuilder
-
add
public jakarta.json.JsonPatchBuilder add(String path, boolean value)
- Specified by:
add
in interfacejakarta.json.JsonPatchBuilder
-
remove
public jakarta.json.JsonPatchBuilder remove(String path)
- Specified by:
remove
in interfacejakarta.json.JsonPatchBuilder
-
replace
public jakarta.json.JsonPatchBuilder replace(String path, jakarta.json.JsonValue value)
- Specified by:
replace
in interfacejakarta.json.JsonPatchBuilder
-
replace
public jakarta.json.JsonPatchBuilder replace(String path, String value)
- Specified by:
replace
in interfacejakarta.json.JsonPatchBuilder
-
replace
public jakarta.json.JsonPatchBuilder replace(String path, int value)
- Specified by:
replace
in interfacejakarta.json.JsonPatchBuilder
-
replace
public jakarta.json.JsonPatchBuilder replace(String path, boolean value)
- Specified by:
replace
in interfacejakarta.json.JsonPatchBuilder
-
move
public jakarta.json.JsonPatchBuilder move(String path, String from)
- Specified by:
move
in interfacejakarta.json.JsonPatchBuilder
-
copy
public jakarta.json.JsonPatchBuilder copy(String path, String from)
- Specified by:
copy
in interfacejakarta.json.JsonPatchBuilder
-
test
public jakarta.json.JsonPatchBuilder test(String path, jakarta.json.JsonValue value)
- Specified by:
test
in interfacejakarta.json.JsonPatchBuilder
-
test
public jakarta.json.JsonPatchBuilder test(String path, String value)
- Specified by:
test
in interfacejakarta.json.JsonPatchBuilder
-
test
public jakarta.json.JsonPatchBuilder test(String path, int value)
- Specified by:
test
in interfacejakarta.json.JsonPatchBuilder
-
test
public jakarta.json.JsonPatchBuilder test(String path, boolean value)
- Specified by:
test
in interfacejakarta.json.JsonPatchBuilder
-
build
public jakarta.json.JsonPatch build()
- Specified by:
build
in interfacejakarta.json.JsonPatchBuilder
-
addOperation
private jakarta.json.JsonPatchBuilder addOperation(JsonPatchImpl.PatchValue operation)
-
toJsonBoolean
private static jakarta.json.JsonValue toJsonBoolean(boolean value)
-
toJsonString
private static jakarta.json.JsonValue toJsonString(String value)
-
toJsonNumber
private static jakarta.json.JsonValue toJsonNumber(int value)
-
-