---
title: allowFragments
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/jsonserialization/readingoptions/allowfragments
---

# allowFragments

A deprecated option that specifies that the parser should allow top-level objects that aren’t arrays or dictionaries.

## Declaration

```swift
static var allowFragments: JSONSerialization.ReadingOptions { get }
```

## See Also

### Reading Options

- [mutableContainers](foundation/jsonserialization/readingoptions/mutablecontainers.md)
- [mutableLeaves](foundation/jsonserialization/readingoptions/mutableleaves.md)
- [fragmentsAllowed](foundation/jsonserialization/readingoptions/fragmentsallowed.md)
- [json5Allowed](foundation/jsonserialization/readingoptions/json5allowed.md)
- [topLevelDictionaryAssumed](foundation/jsonserialization/readingoptions/topleveldictionaryassumed.md)
