 		return String(d)
 	}
 	
-	func encodeArray(a: Array<AnyObject>) throws -> String {
+	func encodeArray(a: Array<JSONValue>) throws -> String {
 		return try encode(a)
 	}
 	
-	func encodeDictionary(d: Dictionary<String, AnyObject>) throws -> String {
+	func encodeDictionary(d: Dictionary<String, JSONValue>) throws -> String {
 		return try encode(d)
 	}
 	

	/// - parameter s: The JSON string data
	/// - throws: `JSONError.SyntaxError`
	/// - returns: The resulting object which may be one of `Int`, `Double`, `String`, `Bool`, `JSONNull`, `JSONArray` or `JSONDictionary`
	public func decode(s: String) throws -> AnyObject {
		
		let scalars = s.unicodeScalars
		g = scalars.generate()

		return s
	}
	
	func encodeValue(value: JSONValue) throws -> String {
		
		switch(value) {
		case let i as Int:
