~openerp-commiter/openobject-addons/stable-sja-branch

« back to all changes in this revision

Viewing changes to comparison/website/erpComparator/erpcomparator/json.py

  • Committer: sja-axelor
  • Date: 2009-10-13 09:52:57 UTC
  • Revision ID: suniljagyasi@gmail.com-20091013095257-8u26ww0r20z9y6ey
add

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# A JSON-based API(view) for your app.
 
2
# Most rules would look like:
 
3
# @jsonify.when("isinstance(obj, YourClass)")
 
4
# def jsonify_yourclass(obj):
 
5
#     return [obj.val1, obj.val2]
 
6
# @jsonify can convert your objects to following types:
 
7
# lists, dicts, numbers and strings
 
8
 
 
9
from turbojson.jsonify import jsonify
 
10