         return self.object ?? NSNull()
     }
     
-    public func rawData(options: NSJSONWritingOptions = NSJSONWritingOptions(rawValue: 0)) throws -> NSData {
+    public func rawData(options: NSJSONWritingOptions = []) throws -> NSData {
         guard let object = object else {
-            throw JSONDataError.ObjectMissing
+            throw DataError.MissingObject
         }
         
         guard NSJSONSerialization.isValidJSONObject(object) else {
-            throw JSONDataError.InvalidJSONObject
+            throw DataError.InvalidObject
         }
         
         return try NSJSONSerialization.dataWithJSONObject(object, options: options)


extension JSON: RawRepresentable {
    
    enum JSONDataError: ErrorType {
        case ObjectMissing
        case InvalidJSONObject
    }
    
    public init?(rawValue: AnyObject) {
        guard NSJSONSerialization.isValidJSONObject(rawValue) else {
            self.init()
            
            return
        }
        
        self.init(rawValue)


public struct JSON {
    
    private var object: AnyObject?
    
    public init() {
        self.object = nil
