Skip to content

Commit

Permalink
Use CodableHelper.jsonEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0c committed Jan 4, 2022
1 parent aae8e6d commit 1c06b4d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ extension AnyCodable: Content {}{{/useVapor}}

extension JSONEncodable where Self: Encodable {
func encodeToJSON() -> Any {
let encoder = JSONEncoder()
let encoder = CodableHelper.jsonEncoder
guard let data = try? encoder.encode(self) else {
fatalError("Could not encode to json: \(self)")
}
Expand Down

0 comments on commit 1c06b4d

Please sign in to comment.