EricChiang/pup — pull request #18 by lazywei (2014-09-23 16:48:30+00:00)
Title: [WIP] Support json template

This is for #2, and is still under development. I open this PR because I want to start discussion.
I move the "traveling" into `ApplySelectors` function so we can reuse it. In other words, we now can simply use this function to parse several groups of selectors.
However, there is one concern: should we implement `json` as a display function? In my opinion, it is not so similar to a display function. Maybe we should add something like *nested function*?
Also, I think we might need to change the behavior of display function a little bit. For example, we would eventually want the `ApplySelectors` to return a list, and then leave other function to *display* the result. In this way, we can use the return results more flexibly.
How do you think?