JSDOC/DocComment.js
[gnome.introspection-doc-generator] / JSDOC / DocTag.js
index e5449ab..692d1f4 100644 (file)
@@ -39,12 +39,31 @@ DocTag = XObject.define(
         isOptional : false,
         defaultValue : '',
         desc : '',
-        /* qdump needed for cahcing?
-        toQDump  :function(t)
+        /**
+         * serialize..
+         */
+        toJSON :function(t)
         {
-            return JSDOC.toQDump(t, 'JSDOC.DocTag.fromDump({', '})', new JSDOC.DocTag());
-        } ,
-        */
+            var ret = { '*object' : 'DocTag' };
+            
+            for (var i in this) {
+                switch (typeof(this[i])) {
+                    case 'function':
+                       continue;
+                       continue;
+                        
+                    case 'string':
+                    case 'number':
+                    case 'boolean':                    
+                        ret[i] = this[i]; continue;
+                    default:
+                        print("unknown type:" + typeof(this[i]));
+                        Seed.quit();
+                   }
+            }
+            return ret;
+        },
+        
 
 
         /**