Files
web2py/gluon/contrib
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-05-03 17:15:53 +01:00
2018-06-08 10:41:13 +01:00
2017-06-20 22:12:43 +02:00
2016-05-12 16:14:01 +02:00
2016-10-04 00:11:54 +02:00
2016-10-01 00:15:47 +02:00
2012-09-30 13:40:41 -05:00
2016-08-13 15:38:55 +02:00
2016-08-13 15:38:55 +02:00
2016-05-29 08:31:19 +02:00
2018-06-07 23:17:07 +01:00
2017-07-10 00:17:15 +01:00
2017-07-14 20:17:30 +01:00
2015-01-17 00:07:10 -06:00
2016-05-11 01:03:04 +01:00
2016-10-04 00:11:54 +02:00
2016-10-04 00:11:54 +02:00
2018-08-17 16:35:54 +02:00
2016-08-13 15:38:55 +02:00
2016-05-11 00:47:23 +01:00
2018-10-29 15:16:28 +00:00
2012-10-19 12:33:53 -05:00