> This means if you really want to be dirty, you can even eval() the
> predicate string or formatter string. So you could put arbitrary
> Python/JS/PHP in the templates. I really dislike that style of
> templating, but if people are porting templates they may want this
> flexibility. I don't want to force any choices.
I'm with you on disliking this idea. The point of this template system
is that it is implemented in multiple languages. Which makes eval
impossible, or at least impractical.
> Also, I think the "Test"/"true" predicate can be built in -- a default
> predicate. I don't know what a good syntax/name for it is, but it's
> just:
>
> {.if test moderator} # Look up the stack for "moderator"
I used 'true', it's built-in, this works in PHP and JS:
json={moderator:true}
{.if moderator}
{.if moderator true}
-s
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---