Hey,

On Sat, May 23, 2009 at 9:16 AM, Andy Chu <[email protected]> wrote:
>
> On Fri, May 22, 2009 at 6:04 AM, Martijn Faassen <[email protected]> 
> wrote:
>> On Thu, May 21, 2009 at 5:49 PM, Andy Chu <[email protected]> wrote:
>>> So the problem with the hooks is that I don't see any use case for
>>> them that can't be addressed in a way that doesn't modify the core
>>> code.
>>
>> You mean by writing a pre-processor for the templates? That's a lot
>> more involved than hooking into some hooks, and effectively is a way
>> to build new languages. json-template is already a template language.
>
> No, I mean by the approach I suggested in my earlier mail.  I just
> sent you a patch in case it's not clear.

Thanks for the patch, but I got that point already once you pointed it
out to me, and I can write one myself (in javascript).

I had been thinking about this more though, and what prompted my
recent postings is that I realized that I could make this almost
entirely transparent to the user. Not only could the JSON structure be
post-processed as you show in your patch (I'm fine with that, I
understood that approach though it's not the one I took in my patch,
but I'm fine with doing that), the insertion of snippets with the
identifying information could also be automated given a few of the
right hook points. That's what my patch was mainly about.

So, the patch isn't about generating the paths; that's incidental. The
patch is about inserting information into the response body each time
json-template does something.

I'll create a branch of the javascript implementation where I'll focus
on the hooks alone (and ways to fill in the hooks); perhaps it will
become more clear.

Regards,

Martijn

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JSON 
Template" 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/json-template?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to