Files
web2py/gluon
Tim Nyborg 77a5c01ac9 Allow custom json encoder
This lets an application use a custom JSONEncoder when making jsonrpc calls (to automatically handle, say, serialization of datetime, or Decimal, or custom classes).

e.g.:
    
import json, datetime, decimal
class ExtendedEncoder(json.JSONEncoder):
    def default(self, obj):
        if isinstance(obj, datetime.datetime):
            return obj.isoformat()
        if isinstance(obj, decimal.Decimal):
            return str(obj)
        return super(ExtendedEncoder, self).default(obj)
    
api = ServerProxy(address, version='2.0', encoder=ExtendedEncoder)
2018-10-29 15:16:28 +00:00
..
2018-10-29 15:16:28 +00:00
2017-06-21 13:22:30 -04:00
2016-08-13 15:38:55 +02:00
2016-08-13 15:38:55 +02:00
2017-06-21 13:32:42 -04:00
2017-10-28 19:29:55 +03:00
2017-05-13 08:26:09 +02:00
2017-06-21 14:38:52 -04:00
2018-05-01 11:06:36 -05:00
2018-09-27 17:57:24 +01:00
2015-03-06 22:12:56 -05:00
2017-08-01 10:26:33 -05:00
2016-08-13 15:38:55 +02:00
2017-12-12 19:23:19 +01:00
2017-08-10 06:49:36 +02:00
2016-08-13 15:38:55 +02:00
2018-05-01 10:51:42 -05:00
2016-08-13 15:38:55 +02:00
2018-09-20 18:59:41 +01:00
2018-02-09 20:56:16 +01:00