<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Evaluations",
  "identifier" : "/documentation/Evaluations/StructuredValue",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations15StructuredValueO"
  },
  "title" : "StructuredValue"
}
-->

# StructuredValue

A type-safe representation of JSON values.

```
enum StructuredValue
```

## Overview

```swift
let name: StructuredValue = "Alice"
let score: StructuredValue = 4.5
let tags: StructuredValue = ["swift", "evaluation"]
```

This type is not `@Generable` due to its recursive array or dictionary structure.
For generable argument specifications, use `ArgumentValue` instead.

## Topics

### Primitive values

[`case string(String)`](/documentation/Evaluations/StructuredValue/string(_:))

A string value.

[`case int(Int)`](/documentation/Evaluations/StructuredValue/int(_:))

An integer value.

[`case double(Double)`](/documentation/Evaluations/StructuredValue/double(_:))

A double-precision floating-point value.

[`case bool(Bool)`](/documentation/Evaluations/StructuredValue/bool(_:))

A Boolean value.

[`case null`](/documentation/Evaluations/StructuredValue/null)

A null value.

### Collection values

[`case array([StructuredValue])`](/documentation/Evaluations/StructuredValue/array(_:))

An array of `StructuredValue` instances.

[`case dictionary([String : StructuredValue])`](/documentation/Evaluations/StructuredValue/dictionary(_:))

A dictionary with string keys and `StructuredValue` instances as values.

### Accessing the underlying value

[`var value: Any`](/documentation/Evaluations/StructuredValue/value)

The underlying value.

## Relationships

### Conforms To

[`ExpressibleByUnicodeScalarLiteral`](/documentation/Swift/ExpressibleByUnicodeScalarLiteral)

[`Encodable`](/documentation/Swift/Encodable)

[`Escapable`](/documentation/Swift/Escapable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`ExpressibleByStringLiteral`](/documentation/Swift/ExpressibleByStringLiteral)

[`Decodable`](/documentation/Swift/Decodable)

[`ExpressibleByIntegerLiteral`](/documentation/Swift/ExpressibleByIntegerLiteral)

[`Copyable`](/documentation/Swift/Copyable)

[`ExpressibleByBooleanLiteral`](/documentation/Swift/ExpressibleByBooleanLiteral)

[`ExpressibleByExtendedGraphemeClusterLiteral`](/documentation/Swift/ExpressibleByExtendedGraphemeClusterLiteral)

[`Sendable`](/documentation/Swift/Sendable)

[`ExpressibleByFloatLiteral`](/documentation/Swift/ExpressibleByFloatLiteral)

[`ExpressibleByDictionaryLiteral`](/documentation/Swift/ExpressibleByDictionaryLiteral)

[`Equatable`](/documentation/Swift/Equatable)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)