Merge pull request #86 from Thurion/master

Changed output to JSON format (use double quotes)
This commit is contained in:
AnthorNet 2019-10-02 10:10:44 +02:00 committed by GitHub
commit a27319e327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -38,8 +38,9 @@ def main():
__message = subscriber.recv(zmq.NOBLOCK)
__message = zlib.decompress(__message)
__json = simplejson.loads(__message)
print __json
# call dumps() to ensure double quotes in output
print simplejson.dumps(__json)
sys.stdout.flush()
else:
print 'Disconnect from EDDN (After timeout)'

View File

@ -36,8 +36,8 @@ def main():
__message = zlib.decompress(__message)
__json = simplejson.loads(__message)
print (__json)
# call dumps() to ensure double quotes in output
print(simplejson.dumps(__json))
sys.stdout.flush()
except zmq.ZMQError as e: