diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 5433fb1..8e745e1 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -2233,6 +2233,22 @@
       // blur
       document.body.click();
     });
+
+
+    // Check json deserialization
+    it('should be initializable', function () {
+      vc = vcClass.create([
+        ['a', 'text'],
+        ['b', 'string'],
+        ['c', 'date']
+      ]).fromJson({
+        "@type" : "koral:doc",
+        "key":"a",
+        "value":"Baum"
+      });
+     
+      expect(vc.element().firstChild.children[1].getAttribute('data-type')).toEqual('text');
+    });
   });
 
   
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index 3df0f70..41b72ad 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -203,12 +203,19 @@
           };
         };
         
-        // Type is unspecified
+        // Type is unspecified - but may be known by the menu
+        if (json["type"] === undefined && KorAP._vcKeyMenu) {
+
+          // Check the VC list if the field is known
+          var type = KorAP._vcKeyMenu.typeOf(this.key());
+          if (type != undefined) {
+            json["type"] = "type:" + type;
+          };
+        };
+
+        // Type is still undefined
         if (json["type"] === undefined) {
-
-          // TODO:
-          // First check the VC list if the field is known
-
+        
           // Check match type
           if (!KorAP._validUnspecMatchRE.test(this.matchop())) {
             KorAP.log(802, errstr802);
diff --git a/dev/js/src/vc/menu.js b/dev/js/src/vc/menu.js
index 6a242e2..0f0d92a 100644
--- a/dev/js/src/vc/menu.js
+++ b/dev/js/src/vc/menu.js
@@ -21,6 +21,7 @@
       return obj;
     },
 
+
     /**
      * Register callback for click event.
      */
@@ -28,12 +29,26 @@
       this._cb = cb;
     },
 
+
     /**
      * A click event was released
      */
     release : function (key, type) {
       if (this._cb !== undefined)
         this._cb(key, type);
+    },
+
+    /**
+     * Return a key type based on a key.
+     * This is a linear search, but should work okay for small
+     * VCs and small key lists.
+     */
+    typeOf : function (key) {
+      for (i in this._items) {
+        if (this._items[i].key() === key) {
+          return this._items[i].type();
+        }
+      };
     }
   };
 });
