Package gluon :: Module serializers
[hide private]
[frames] | no frames]

Module serializers

source code

This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Functions [hide private]
 
cast_keys(o, cast=<type 'str'>, encoding='utf-8')
Builds a new object with <cast> type keys
source code
 
loads_json(o, unicode_keys=True, **kwargs) source code
 
custom_json(o) source code
 
xml_rec(value, key, quote=True) source code
 
xml(value, encoding='UTF-8', key='document', quote=True) source code
 
json(value, default=<function custom_json at 0x29fb668>) source code
 
csv(value) source code
 
ics(events, title=None, link=None, timeshift=0, calname=True, **ignored) source code
 
rss(feed) source code
 
yaml(data) source code
 
loads_yaml(data) source code
Variables [hide private]
  have_yaml = True
  __package__ = 'gluon'
Function Details [hide private]

cast_keys(o, cast=<type 'str'>, encoding='utf-8')

source code 
Builds a new object with <cast> type keys

Arguments:
    o is the object input
    cast (defaults to str) is an object type or function
          which supports conversion such as:

          >>> converted = cast(o)

    encoding (defaults to utf-8) is the encoding for unicode
             keys. This is not used for custom cast functions

Use this funcion if you are in Python < 2.6.5
This avoids syntax errors when unpacking dictionary arguments.