File: Utils.py

package info (click to toggle)
python-applicationinsights 0.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 608 kB
  • ctags: 801
  • sloc: python: 4,572; makefile: 3
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)