How to use the jsonlib.dumps function in jsonlib

To help you get started, we’ve selected a few jsonlib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emesene / emesene / emesene / e3 / jabber / pyfacebook / __init__.py View on Github external
def __fixup_param(name, klass, options, param):
    optional = 'optional' in options
    default = [x[1] for x in options if isinstance(x, tuple) and x[0] == 'default']
    if default:
        default = default[0]
    else:
        default = None
    if param is None:
        if klass is list and default:
            param = default[:]
        else:
            param = default
    if klass is json and isinstance(param, (list, dict)):
        param = simplejson.dumps(param)
    return param
github pythonanywhere / dirigible-spreadsheet / python / dirigible / sheet / sheet.py View on Github external
def save(self, *args, **kwargs):
        if self.name == 'Untitled':
            models.Model.save(self, *args, **kwargs) # save to set self.id
            self.name = 'Sheet %d' % (self.id,)
        self.column_widths_json = jsonlib.dumps(self.column_widths)
        models.Model.save(self, *args, **kwargs)

jsonlib

JSON serializer/deserializer for Python

GPL-3.0
Latest version published 15 years ago

Package Health Score

43 / 100
Full package analysis

Similar packages