Skip to content

Commit ed5f86f

Browse files
authored
Merge pull request #42 from instana/better_json_encoding
Assure that all json keys are lowercase
2 parents f86f18f + f4d68c9 commit ed5f86f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instana/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self, sensor):
4747

4848
def to_json(self, o):
4949
try:
50-
return json.dumps(o, default=lambda o: o.__dict__,
50+
return json.dumps(o, default=lambda o: {k.lower(): v for k, v in o.__dict__.items()},
5151
sort_keys=False, separators=(',', ':')).encode()
5252
except Exception as e:
5353
log.info("to_json: ", e, o)

0 commit comments

Comments
 (0)