Skip to content

Commit

Permalink
json fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Jan 27, 2016
1 parent 8aec55e commit 7086bba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/ResponseConvertible.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//
// Based on comment from ElvishJerricco <https://www.reddit.com/r/swift/comments/42n46u/a_laravellumen_inspired_web_framework_for_swift/czc3nw8>
//
import Foundation

public protocol ResponseConvertible {
func response() -> Response
Expand All @@ -12,7 +13,7 @@ extension String: ResponseConvertible {
}
}

extension Dictionary: ResponseConvertible {
extension NSDictionary: ResponseConvertible {
public func response() -> Response {
do {
return try Response(status: .OK, json: self)
Expand All @@ -22,7 +23,7 @@ extension Dictionary: ResponseConvertible {
}
}

extension Array: ResponseConvertible {
extension NSArray: ResponseConvertible {
public func response() -> Response {
do {
return try Response(status: .OK, json: self)
Expand Down

0 comments on commit 7086bba

Please sign in to comment.