Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dduan committed Dec 16, 2024
1 parent 0181279 commit b3b3767
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,14 @@ the right shape. This is what `JSONSerialization` does for JSON.
You can perform this step yourself:

```swift
import TOMLDecoder
let tomlString = """
[Person]
let firstName = "Elon"
let lastName = "Musk"
"""

let toml: [String: Any] = try JSONDecoder.tomlTable(from: tomlString)
let toml: [String: Any] = try TOMLDecoder.tomlTable(from: tomlString)

(toml["Person"] as? [String: String])?["firstName"] // Optional("Elon")
```
Expand Down

0 comments on commit b3b3767

Please sign in to comment.