anchor.diff:      */
     }
   
  +  /// Function used by transformer in order to tell VaneModel that code has
  +  /// been generated
  +  bool useMirrors() => true;
  +
     static void _validateAny(model) {
       if(VMMS.isBasicType(model)) {
         // Validate built type
  
positive.code:   // TODO: Add special case for DateTime
    // https://code.google.com/p/dart/issues/detail?id=16628
  
  
    static String transform(Object ob) {
  //    return '''  Map toJson() {
  //    Map map = new Map();
  //    map["aaa"] = this.aaa;
  //    map["bbb"] = this.bbb;
  //    return map;
  //  }''';
  
  
      // Function to convert objects to a map representation
      String convertObject(Object ob) {
        InstanceMirror This = reflect(ob);
        Map map = new Map();
        StringBuffer code = new StringBuffer();
  
        code.writeln('  Map toJson() {');
        code.writeln('    Map map = new Map();');
  
        This.type.declarations.forEach((Symbol key, DeclarationMirror val) {
          if(val is VariableMirror) {
            TypeMirror listMirror = reflectType(List);
  
            if(VMMS.isBasicType(val.type.reflectedType)) {
  //          if(val.type.reflectedType == String ||
  //             val.type.reflectedType == int ||
  //             val.type.reflectedType == bool ||
  //             val.type.reflectedType == num) {
              // For transformer
              code.writeln('    map["${symbolString(key)}"] = this.${symbolString(key)};');
            } else if(val.type.isAssignableTo(listMirror)) {
              // Note: We use 'isAssignableTo()' here instead of just '==' because
              // while 'val.type.reflectedType == List' does work on a list like
              // 'List a = [1,2]' it does not work on 'List<int> a = [1,2]',
              // 'isAssignableTo()' works in both cases.
              code.writeln('    map["${symbolString(key)}"] = this.${symbolString(key)};');
            }
          }
        });
        code.writeln('    return map;');
        code.writeln('  }');
  
        return code.toString();
      }
  
      return convertObject(ob);
    }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
    Map toJson() {
      // Function to convert objects to a map representation
      Map modelToJson(Object model) {
        InstanceMirror mirror = reflect(model);
        Map map = new Map();
  
  
negative.code:       throw("Unsupported datatype......");
      }
  
      // Use either mirrors or predefined decode function
      bool useMirr = false;
  
      // TODO: Benchmark and see what is fastest, use try/catch or mirrors to see
      // if an object has a _useMirrors() function.
      try {
        useMirr = model.useMirrors();
      } catch(e) {
        // If the object don't have a _useMirror function, it's not a VaneModel
        // and we force using mirrors implementation
        useMirr = true;
      }
  
      if(useMirr == true) {
        // Run mirror based jsonToModel function, will run recursively on object
        // if needed
        return jsonToModel(json, model);
      } else {
        // Run code generated "factory" method (not a Dart built in factory since
        // we can't use it as flexibly as a method)
        var document;
  
        // We support both json strings and map documents
        if(json is String) {
          document = JSON.decode(json);
        } else {
          document = json;
        }
  
        return model.fromDocument(document);
      }
  
      /*
      // Validate data
  