       @graphStore.addNode @nodeB
       @graphStore.addLink @link
 
-    describe "The serialize function", ->
+    describe "The toJsonString function", ->
       it "should serialize all the properties of the model", ->
-        model = @graphStore.serialize()
+        jsonString = @graphStore.toJsonString()
+        model = JSON.parse jsonString
 
         model.version.should.exist
         model.nodes.should.exist

        model.links.length.should.equal 1

      it "should correctly serialize a node", ->
        node = @graphStore.serialize().nodes[0]
        node.key.should.equal "a"
        node.data.title.should.equal "a"
        node.data.x.should.equal 10

        node.data.valueDefinedSemiQuantitatively.should.equal false

      it "should correctly serialize a link", ->
        jsonString = @graphStore.toJsonString()
        link = JSON.parse(jsonString).links[0]
        link.title.should.equal ""
        link.color.should.equal "#777"
        link.sourceNode.should.equal "a"
