File: Utils.py

package info (click to toggle)
python-applicationinsights 0.11.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 876 kB
  • sloc: python: 5,948; makefile: 151; sh: 77
file content (7 lines) | stat: -rw-r--r-- 212 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
import json

class TestJsonEncoder(json.JSONEncoder):
    def default(self, obj):
        if obj and obj.__class__.__name__ == 'object':
            return {}
        return json.JSONEncoder.default(self, obj)