-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PostgresNIO's default JSON coders (#195)
* Use postgres-nio's `_defaultJSONEncoder` and `_defaultJSONDecoder` global variables as the default values for the JSON coders in `PostgresDataEncoder` and `PostgresDataDecoder` * Deprecate the previous "jsonDecoder" variable of PostgresDataDecoder and rename it to "json" * Fix spacing slightly in PostgresDataDecoder * Fix spacing in PostgresDataDecoder
- Loading branch information
1 parent
806a513
commit cbbe3ef
Showing
3 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
Sources/PostgresKit/Deprecations/PostgresDataDecoder+JSONDecoder.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import class Foundation.JSONDecoder | ||
|
||
extension PostgresDataDecoder { | ||
@available(*, deprecated, renamed: "json") | ||
public var jsonDecoder: JSONDecoder { | ||
return self.json as! JSONDecoder | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters