Skip to content

Commit

Permalink
Add usage note to README for JSONDecoder
Browse files Browse the repository at this point in the history
  • Loading branch information
juri committed Jul 11, 2023
1 parent b8430c9 commit de2c33d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ print(date.timeIntervalSinceReferenceDate)
// output: 710590440.0
```

There's a helper function you can use with Foundation's `JSONDecoder`:

```swift
import Parse3339

let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .custom(Parse3339.parseFromDecoder(_:))
```

For `Package.swift` snippets and documentation, visit the [Swift Package Index page](https://swiftpackageindex.com/juri/Parse3339).

## Speed and memory usage
Expand Down

0 comments on commit de2c33d

Please sign in to comment.