That's a very simple example, but imagine a more complex situation
where you want to have polymorphic functions on a list of results. Or
where the functions are lift ajax calls.
Like this:
[{name:"marius", poke:function(){liftAjax...}}, {name:"dpp",
poke:function(){liftAjax...}}]
- Jon
On Feb 3
It's my app that's returning the function
On Feb 3, 3:08 pm, David Pollak wrote:
> On Wed, Feb 3, 2010 at 11:55 AM, Jonathan Hoffman wrote:
>
> > I was able to find the root cause. jQuery 1.4.1 does not consider
> > javascript objects that contain functions to be be valid JSON.
>
> According the
Hmmm ... in Lift we do use JSON structures with functions (but not
with JSON mime type). For instance ScriptRenderer.scala defines a JSON
with functions. jlift.js also defines a JSON with functions.
But looking at your example app, you're using JSON mimetype in the
response and that JSON has a fun
On Wed, Feb 3, 2010 at 11:55 AM, Jonathan Hoffman wrote:
> I was able to find the root cause. jQuery 1.4.1 does not consider
> javascript objects that contain functions to be be valid JSON.
>
According the to JSON spec, a function is not valid JSON.
>
> This is ok: {"foo":"bar"}
> This is bad:
I was able to find the root cause. jQuery 1.4.1 does not consider javascript
objects that contain functions to be be valid JSON.
This is ok: {"foo":"bar"}
This is bad: {"foo":function(){alert('hello')}
jquery-1.4.1.js:491 --> parseJSON
jquery 1.3.2 simply eval'd strings to created json objects