serializers
Module¶
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)
-
gluon.serializers.
cast_keys
(o, cast=<type 'str'>, encoding='utf-8')[source]¶ Builds a new object with <cast> type keys. Use this function if you are in Python < 2.6.5 This avoids syntax errors when unpacking dictionary arguments.
Parameters: - 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