mozilla/jydoop — pull request #26 by indygreg (2013-04-20 03:44:46+00:00)
Title: Add fhr_mapper decorator

Instead of having every FHR job require it's map() reimplement the logic for decoding the raw value into a useful object, I figured it would best if we centralize this logic so map() implementations can get going faster - and always using the preferred method for doing the conversion.

So, I introduced a decorator that can easily be applied to a map() function. It automagically JSON-decodes the payload function using the Jackson API. It just works.

Eventually, I'd like to extend this to have the payload represented by a custom Python class (with common APIs) to further reduce boilerplate in analysis scripts. Expect additional pull requests.