-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA224
> My ownly question is that when we do @jsonify, do we need to say which
> action we want to use for returning a json response or just putting
> the
> @jsonify asumes that the action following that line is the one to be
> used for responding to json requests?
@jsonify will convert to json whatever object that function returns.
I dont know what you mean by "the one that will be used to answer json
requests"
I assume that more than one of your actions will return json objects.
did you read at all the book chapter that was linked to you?
> Secondly, is it necessary to attach the json objects to the
> tmpl_context
> (c) for sending across?
No, you dont need to use templates, you just return the json object
directly.
On Dec 19, 2009, at 3:35 AM, Krishnakant wrote:
> On Thu, 2009-12-17 at 22:21 +0000, Graham Higgins wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>>
>> On 17 Dec 2009, at 21:20, Marius Gedminas wrote:
>>
>>> I recall some fun times being had by all when the json dumper
>>> generated
>>>
>>> {title: "something irrelevant", date: 2004-01-17}
>>>
>>> which the browser nicely and silently evaluated to
>>>
>>> {title: "something irrelevant", date: 1986}
>>
>>
>>
>> 'Tis true, computers are even more pitilessly literal than children.
>>
>> Cheers,
>>
>> Graham
>
> HI Graham,
> I thought I would put this question in a different way, not just to
> keep
> it on-topic for pylons list and make my mis-understanding clear about
> the issue at hand.
>
> I know that json objects are nothing but key value paers like the dict
> in python.
> My ownly question is that when we do @jsonify, do we need to say which
> action we want to use for returning a json response or just putting
> the
> @jsonify asumes that the action following that line is the one to be
> used for responding to json requests?
>
> Secondly, is it necessary to attach the json objects to the
> tmpl_context
> (c) for sending across?
>
> Happy hacking.
>
> Krishnakant.
>
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]
> .
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en
> .
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.12 (Darwin)
iFYEARELAAYFAksssrYACgkQFXxYxga0LLnLQQDgoPB2NP+DbRaGsTaRtyyuZlHT
lFuPw4FymaD4oQDfd1iEBMt1OfU5kpsUVVBrsa872/xjg0EVa0UIyw==
=pW9k
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.