On Tue, Oct 6, 2009 at 8:58 PM, Andy Chu <[email protected]> wrote: > On Tue, Oct 6, 2009 at 2:46 PM, Steven Roussey <[email protected]> wrote: >> >>> Right, but just like formatters, you can interpret the predicate >>> string however you want -- in this case it's "counter plural". So you >>> can interpreter one part as a string identifying a node. If you have >>> the context, you can look up the argument. I'll try to code this up. >> >> So what is the name of the predicate? >> - plural >> - counter plural > > It's completely up to the application. JSON Template says nothing > about how it is interpreted. I just implemented what I've been > talking about, which should hopefully clear it up: > > http://code.google.com/p/json-template/source/detail?r=48e71023b458e0ecfeb019bff6bd43c5eca7edb5 > > See the 3 tests for concrete examples. Now it will be much easier to > add more advanced formatters/predicates with args. More examples > still TODO.
And of course the main point is that arguments to formatters/predicates are parsed inside application code -- in user-provided FunctionRegistry instances, which is more natural than the old higher-order function method. JSON Template doesn't parse any arguments. Andy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
