json parser can handle bytes natively
This commit is contained in:
parent
198f3ff078
commit
4ba7152893
|
|
@ -156,7 +156,7 @@ class JsonParser(LineBasedModule):
|
||||||
|
|
||||||
def process(self, line):
|
def process(self, line):
|
||||||
try:
|
try:
|
||||||
msg = json.loads(line.decode())
|
msg = json.loads(line)
|
||||||
msg["mode"] = self.mode
|
msg["mode"] = self.mode
|
||||||
logger.debug(msg)
|
logger.debug(msg)
|
||||||
return msg
|
return msg
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue