.. _dojox/gfx/utils/fromJson: dojox.gfx.utils.fromJson ======================== :Status: Contributed, Draft :Version: 1.4 :Author: Eugene Lazukin, Jared Jurkiewicz :Available: since V1.0 .. contents:: :depth: 2 The *dojox.gfx.utils.fromJson* is a helper function designed to take a JSON serialized dojox.gfx.Surface object and restore its contents into another dojox.gfx.Surface. The function itself is simple to use. ===== Usage ===== If you wish to use this function, then your code must do a *dojo.require("dojox.gfx.utils");* to load it. The function signature is: *dojox.gfx.utils.fromJson(/*dojox.gfx.Surface*/ surface, /*String*/ json); So basic usage is: .. code-block :: javascript var mySurface = dojox.gfx.createSurface(newNode, 200, 200); dojox.gfx.utils.toJson(mySurface, json); Functional Exaple ----------------- .. cv-compound :: .. cv :: javascript .. cv :: html Original surface: