News for hackers. Stuff that matters.
Re:JSON Template by nostrademons on Tuesday March 31, 2009 @03:17AM (#539777)
Why does it need separate constructs for {.section} and {.repeated section}? You could take the absence of a key to signify "hide this section", its presence to signify "show it once, with these values", and its presence as an array to signifiy "show it multiple times, one per element". That's the way google-ctemplate works, and it seems to work quite well.

(BTW, I had no idea Google's templating library was an open-source project. Kinda fun to see that the stuff I work with daily isn't a proprietary walled garden after all. And some trivia for those who don't routinely Google project owners: it's written and maintained by Google's employee #1.)

There are no comments on this comment yet.