# noJsonUnsafeValues

Rule `biome/noJsonUnsafeValues`. Disallow unsafe JSON values that may cause interoperability issues.

- Source: biome
- Technologies: JSON
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #526 by reach, #161 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noJsonUnsafeValues` | yes | no | group nursery, since 2.5.14 | [docs](https://biomejs.dev/linter/rules/no-json-unsafe-values/) |

## Code examples

### Incorrect: the rule reports this

```json
{
  "invalid1": 2e308
}
```

```json
{
  "invalid2": -2e308
}
```

```json
{
  "invalid3": "\ud83d"
}
```

### Correct: the rule accepts this

```jsonc
[
  123,
  1234,
  12345, // Regular numbers within safe range

  "🔥", // Properly formed Unicode character (fire emoji)

  "\ud83d\udd25", // Same character with proper surrogate pair

  0.00000,
  0e0000000,
  0.00000e0000 // Zero represented in different valid ways
]
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noJsonUnsafeValues": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noInvalidPropertyInitValue](https://lintradar.dev/rules/biome/noInvalidPropertyInitValue.md): Checks that the `initial-value` of an `@property` rule follows the value format declared by its `syntax`.
- [biome/noJsxNamespace](https://lintradar.dev/rules/biome/noJsxNamespace.md): Disallow JSX namespace syntax.
- [biome/noInvalidPositionAtImportRule](https://lintradar.dev/rules/biome/noInvalidPositionAtImportRule.md): Disallow `@import` after other rules.
- [biome/noMisplacedListElements](https://lintradar.dev/rules/biome/noMisplacedListElements.md): Require `<li>` elements with an HTML element parent to be children of `<ul>`, `<ol>`, or `<menu>`.
- [biome/noInvalidGridAreas](https://lintradar.dev/rules/biome/noInvalidGridAreas.md): Disallow invalid named areas in CSS grid templates.
- [biome/noMisrefactoredShorthandAssign](https://lintradar.dev/rules/biome/noMisrefactoredShorthandAssign.md): Disallow shorthand assign when variable appears on both sides.

---

Web page: https://lintradar.dev/rules/biome/noJsonUnsafeValues. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
