/// <summary> /// Gets the client-side data as a <see cref="JToken"/> /// </summary> /// <returns></returns> JToken CreateNodeJObject(Document document) { Contract.Requires <ArgumentNullException>(document != null); // serialize document state to data field using (var wrt = new JTokenWriter()) { RemoteHelper.GetJson(wrt, document.Root); return(wrt.Token); } }