dang! is there any way to get that back into the framework?<br><br><div class="gmail_quote">On Fri Jan 16 2015 at 2:31:41 PM Paul DeBruicker &lt;<a href="mailto:pdebruic@gmail.com">pdebruic@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">JQAjax used to have callback:json: but it got lost in the Seaside 3.1<br>
reshuffle.  I think it does what you want.<br>
<br>
<br>
JQAjax&gt;&gt;callback: aBlock json: anObject<br>
        &quot;Register aBlock as a secondary callback. anObject is a reference to a<br>
Javascript object on the client-side. anObject will be serialized to a JSON<br>
string, sent back to the server, deserialized from JSON to nested Smalltalk<br>
objects, and result passed into aBlock.<br>
<br>
        Note: The serialization of Javascript objects to JSON requires a modern web<br>
browser with native JSON support or the JSJsonDeploymentLibrary to be<br>
loaded. Objects that recursively refer to themselves and objects that<br>
contain or objects that contain methods might not be serializable and cause<br>
the web browser to loop inifinitely or throw an exception.&quot;<br>
<br>
        self<br>
                callback: [ :value | aBlock value: (JSJsonParser parse: value) ]<br>
                value: (JSJson new stringify: anObject)<br>
<br>
<br>
<br>
<br>
<br>
sergio_101 wrote<br>
&gt; i accidentally sent this to the pharo group, rather than this group.. so i<br>
&gt; hope they forgive me over there. anyway:<br>
&gt;<br>
&gt; i am currently working on an app that uses a javascript library to render<br>
&gt; the state of an object inside seaside. i am trying to figure out the best<br>
&gt; way to transfer the state of object to javascript.<br>
&gt;<br>
&gt; the state of the machine changes via form inputs and ajax.<br>
&gt;<br>
&gt; i already have the code to convert the state of my object to json, so i am<br>
&gt; thinking i can do this one of two ways..<br>
&gt;<br>
&gt; via ajax, inject the json code into a variable in a function that is fired<br>
&gt; off by ajax. i just am not sure how to inject this json string into the<br>
&gt; page where it would look like the contents of a variable. any ideas?<br>
&gt;<br>
&gt; or, i could make a component that just spits out the current state as a<br>
&gt; json string. this way, when the value of a form element changes, that<br>
&gt; value<br>
&gt; is sent over ajax to seaside, and seaside can answer back with the new<br>
&gt; state as a json string. i am just not sure how to implement this, either.<br>
&gt; any ideas?<br>
&gt;<br>
&gt; let me know if there is a better approach to this, also.<br>
&gt;<br>
&gt; thanks!<br>
&gt;<br>
&gt; ______________________________<u></u>_________________<br>
&gt; seaside mailing list<br>
<br>
&gt; seaside@.squeakfoundation<br>
<br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.<u></u>org/cgi-bin/mailman/listinfo/<u></u>seaside</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://forum.world.st/passing-json-between-seaside-and-javascript-tp4799930p4800031.html" target="_blank">http://forum.world.st/passing-<u></u>json-between-seaside-and-<u></u>javascript-tp4799930p4800031.<u></u>html</a><br>
Sent from the Seaside General mailing list archive at Nabble.com.<br>
______________________________<u></u>_________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.<u></u>squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.<u></u>org/cgi-bin/mailman/listinfo/<u></u>seaside</a><br>
</blockquote></div>