cmlenz@4: # This module provides helper functions for the JSON part of your cmlenz@4: # view, if you are providing a JSON-based API for your app. cmlenz@4: cmlenz@4: # Here's what most rules would look like: cmlenz@4: # @jsonify.when("isinstance(obj, YourClass)") cmlenz@4: # def jsonify_yourclass(obj): cmlenz@4: # return [obj.val1, obj.val2] cmlenz@4: # cmlenz@4: # The goal is to break your objects down into simple values: cmlenz@4: # lists, dicts, numbers and strings cmlenz@4: cmlenz@4: from turbojson.jsonify import jsonify cmlenz@4: