# JSON_DELETE

*LSL constant*

```lsl
string JSON_DELETE = "\\u{FDD8}";
```

A [constant](https://wiki.secondlife.com/wiki/Category:LSL_Constants) used to delete a value within a [JSON](http://www.json.org/) text string.

## Caveats

- Using `JSON_DELETE` will **not** prune empty objects or arrays at higher levels.
- Using `JSON_DELETE` to delete a non-existent array or object element in a JSON string will return [JSON_INVALID](/constants/JSON_INVALID/), not an unaltered string.

## Examples

<details open>
<summary>Example 1</summary>

```lsl
default
{
    touch_start(integer num_detected)
    {
        string jsonString = "[1,2,3,4,5]";

        llSay(PUBLIC_CHANNEL, "Original: " + jsonString);

    //  we remove the first item (list has zero-based index!)
        jsonString = llJsonSetValue(jsonString, [0], JSON_DELETE);

    //  "[2,3,4,5]"
        llSay(PUBLIC_CHANNEL, "Modified: " + jsonString);
    }
}
```

</details>

## See also

### Constants

| Type Flags | Value | Unicode | [Integer](/functions/llOrd/) | [URL Encoded](https://wiki.secondlife.com/wiki/Category:LSL_Encoding/URL) | HTML Encoded | Description |
| --- | --- | --- | --- | --- | --- | --- |
| [JSON_INVALID](/constants/JSON_INVALID/) |  | U+FDDO | 64976 | "%EF%B7%90" | &amp;#xFDD0; | Value returned when inputs are not well formed. |
| [JSON_OBJECT](/constants/JSON_OBJECT/) |  | U+FDD1 | 64977 | "%EF%B7%91" | &amp;#xFDD1; |  |
| [JSON_ARRAY](/constants/JSON_ARRAY/) |  | U+FDD2 | 64978 | "%EF%B7%92" | &amp;#xFDD2; |  |
| [JSON_NUMBER](/constants/JSON_NUMBER/) |  | U+FDD3 | 64979 | "%EF%B7%93" | &amp;#xFDD3; |  |
| [JSON_STRING](/constants/JSON_STRING/) |  | U+FDD4 | 64980 | "%EF%B7%94" | &amp;#xFDD4; |  |
| [JSON_NULL](/constants/JSON_NULL/) |  | U+FDD5 | 64981 | "%EF%B7%95" | &amp;#xFDD5; |  |
| [JSON_TRUE](/constants/JSON_TRUE/) |  | U+FDD6 | 64982 | "%EF%B7%96" | &amp;#xFDD6; |  |
| [JSON_FALSE](/constants/JSON_FALSE/) |  | U+FDD7 | 64983 | "%EF%B7%97" | &amp;#xFDD7; |  |
| [JSON_DELETE](/constants/JSON_DELETE/) |  | U+FDD8 | 64984 | "%EF%B7%98" | &amp;#xFDD8; | Used with [llJsonSetValue](/functions/llJsonSetValue/) to remove a key-value pair. |

### Functions

- [llJsonSetValue](/functions/llJsonSetValue/)

---

*Source: [JSON DELETE](https://wiki.secondlife.com/wiki/JSON_DELETE) on the Second Life Wiki. Content from the Second Life Wiki articles JSON DELETE (revision 1213769, 2023-03-24) and Template:LSL Constants/JSON (revision 1215249, 2023-10-29), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/constants/JSON_DELETE/
