Hey there,

I've hacked around in json-template.js to see whether I could add
these hooks. Here is my attempt:

http://codereview.appspot.com/63124/show

(I hope I used codereview correctly)

Sketching out my changes:

* modifications of _ScopedContext to track name. Modification to
construct the path.

* BeforeSection and BeforeRepeatedSection hooks that can be passed
along with Template options. These are functions that take the context
and the callback as arguments. callback can then be used to insert
text into the result stream. (perhaps they should be called
before_section and before_repeated_section?)

I got the v8-based tests running, and the javascript tests still pass
with my modifications.

I experimented a bit with javascript/verifier.py to try passing along
the BeforeSection and BeforeRepeatedSection that print the path. This
seems to work at least in some cases, but of course all the tests
break.

Any ideas on how I can modify the tests so I can pass along javascript
functions as options? I guess this would be a javascript only test (if
I adjust the Python source I'd need different hook functions), and I
saw a @testy.only_verify that can help, but I'm not quite sure how to
even pass this options information in properly from
jsontemplate_test.py...

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