davidcox/genson — pull request #27 by jaberg (2012-02-02 16:19:17+00:00)
Title: adding JSONFunction, lazy decorator, and indexable operands

I realized that the fson stuff I wrote in eccv12 is redundant with GenSON, so I rewrote into GenSON.

The following test illustrates what I am trying to enable

https://github.com/jaberg/genson/blob/fson/test/test_lazy.py

Personally, I don't like the GenSON DSL, and I'd prefer to weave my GenSON program construction into Python using the "foo.lazy()" calling convention. Is this consistent with how GenSON is meant to be used? Note that I also added a `register_lazy` decorator that add the decorated function's `__name__` to the registry so that it is also accessible via the parser.

Making GenSON operands indexable required moving GenSONFunction from functions.py to internal_ops.py, that's why I moved that stuff.

(cc @yamin81)