 }
 
 extension JSON: Decodable {
+  /**
+    Decode `JSON` into `Decoded<JSON>`.
+
+    This simply wraps the provided `JSON` in `.Success`. This is useful because
+    it means we can use `JSON` values with the `<|` family of operators to pull
+    out sub-keys.
+
+    - parameter j: The `JSON` value to decode
+
+    - returns: The provided `JSON` wrapped in `.Success`
+  */
   public static func decode(j: JSON) -> Decoded<JSON> {
     return pure(j)
   }

}

public extension JSON {
  static func parse(json: AnyObject) -> JSON {
    switch json {
    case let v as [AnyObject]: return .Array(v.map(parse))

import Foundation

/// A type safe representation of JSON.
public enum JSON {
  case Object([Swift.String: JSON])
  case Array([JSON])
