to
Sets the JsonElement at this pointer path to value.
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
The String value to set; wrapped in JsonPrimitive.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer path to value.
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
The Boolean value to set; wrapped in JsonPrimitive.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer path to value.
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
The Int value to set; wrapped in JsonPrimitive.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer path to value.
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
The Long value to set; wrapped in JsonPrimitive.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer path to value.
Note: Float values may not round-trip exactly due to how JsonPrimitive serializes floating-point numbers.
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
The Float value to set; wrapped in JsonPrimitive.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer path to value.
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
The Double value to set; wrapped in JsonPrimitive.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer path to JsonNull.
This overload is the most-specific match for a literal null at the call site and takes precedence over the JsonElement overload.
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
Must be null.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer path to value.
Use this overload when holding a JsonElement variable (including JsonObject, JsonArray, JsonPrimitive, or JsonNull). For literal primitive values, prefer the typed overloads. For literal null, prefer to(value: Nothing?).
Return
Unit
Receiver
The JSON Pointer path string identifying the location to set.
Parameters
The JsonElement to set at the specified path.
Throws
if the path is invalid or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to value.
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
The String value to set; wrapped in JsonPrimitive.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to value.
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
The Boolean value to set; wrapped in JsonPrimitive.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to value.
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
The Int value to set; wrapped in JsonPrimitive.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to value.
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
The Long value to set; wrapped in JsonPrimitive.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to value.
Note: Float values may not round-trip exactly due to how JsonPrimitive serializes floating-point numbers.
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
The Float value to set; wrapped in JsonPrimitive.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to value.
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
The Double value to set; wrapped in JsonPrimitive.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to JsonNull.
This overload is the most-specific match for a literal null at the call site and takes precedence over the JsonElement overload.
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
Must be null.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.
Sets the JsonElement at this pointer to value.
Use this overload when holding a JsonElement variable (including JsonObject, JsonArray, JsonPrimitive, or JsonNull). For literal primitive values, prefer the typed overloads. For literal null, prefer to(value: Nothing?).
Return
Unit
Receiver
The JsonPointer identifying the location to set.
Parameters
The JsonElement to set at the specified path.
Throws
if the pointer is the root or navigation fails.
if an array index in the pointer path is out of bounds.