 		}
 		
 		self.commons.objectValueBlock = { [weak self] (instance, typeInfo, value, key) -> Void in
-			let jsonObject = self?.commons.write(fromObject: value!)
+			let jsonObject = self?.commons.write(fromObject: value!, withConfig: config)
 			instance.setValue(jsonObject, forKey: key)
 		}
 		

	
	/// Writes a json formatted string from a Swift class object.
	///
	/// - Parameter anyObject: instance of an object to be written.
	/// - Returns: a String of json formatted representation of the anyObject.
	public func write<T : NSObject>(anyObject: T) -> String? {
		self.setupCommons()
		
		let jsonObject = self.commons.write(fromObject: anyObject)
		
		self.unsetupCommons()
		

		return String(data: data, encoding: .utf8)
	}
	
	fileprivate func setupCommons(withConfig config: JsonConfig? = nil) {
		self.commons.valueBlock = { (instance: AnyObject, value, key) -> AnyObject? in
			return (instance as! NSObject).value(forKey: key) as AnyObject
		}
