'Takes an object or a tuple of objects and serializes them and stores it
in the db as a json string.'

@arguments.setter
def arguments(self, args=[]):

    if (args is None):
        args = []
    if (not isinstance(args, (list, tuple))):
        args = (args,)
    serialize_me = []
    for arg in args:
        if isinstance(arg, basestring):
            serialize_me.append({'str': arg})
        elif isinstance(arg, (int, long)):
            serialize_me.append({'int': arg})
        elif isinstance(arg, tuple):
            serialize_me.append(dict(((unicode(arg[0]._meta), arg[1]),)))
        elif (arg is not None):
            serialize_me.append(dict(((unicode(arg._meta), arg.pk),)))
    self._arguments = json.dumps(serialize_me)
