> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryrollup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JSONValue

> Any JSON value, for Rollup results without a fixed shape.

```swift theme={null}
public enum JSONValue: Codable, Hashable, Sendable {
    case null
    case bool(Bool)
    case number(Double)
    case string(String)
    case array([JSONValue])
    case object([String: JSONValue])
}
```

Used for the parts of results without a fixed shape, such as a search's plan details and a filled profile. It encodes as the JSON it holds.

<ResponseField name="init(json:)" type="init(json: Data) throws">
  Parses JSON text.
</ResponseField>

<ResponseField name="json" type="Data">
  The value as JSON text, with sorted keys.
</ResponseField>

You can pass a schema to `profile` as a `JSONValue`:

```swift theme={null}
let schema: JSONValue = .object([
    "type": .string("object"),
    "properties": .object([
        "home_city": .object(["type": .string("string")])
    ])
])
let profile = try await Rollup.shared.profile(schema: schema)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.