     textBody = text
   }
 
-  //public func asJson() -> JSON? {
-  //    return jsonBody
-  //}
+  public func asJson() -> JSON? {
+      return jsonBody
+  }
 
   public func asUrlEncoded() -> [String:String]? {
     return urlEncodedBody

}

public class ParsedBody {
  // private var jsonBody: JSON?
  private var urlEncodedBody: [String:String]?
  private var textBody: String?

  //public init (json: JSON) {
  //    jsonBody = json
  //}

  public init (urlEncoded: [String:String]) {
    urlEncodedBody = urlEncoded

    if let contentType = contentType {
      do {

        if ContentType.isType(contentType, typeDescriptor: "json") {
            let bodyData = try readBodyData(message)
            let json = JSON(data: bodyData)
            if json != JSON.null {
               return ParsedBody(json: json)
            }
        }
        else if ContentType.isType(contentType, typeDescriptor: "urlencoded") {
          let bodyData = try readBodyData(message)
          var parsedBody = [String:String]()
          var success = true
