def displayhosts_json(recordsgen, out=sys.stdout):
 out.write(json.dumps(recordsgen, default=utils.serialize))
 out.write('\n')

def displayhosts_json ( recordsgen , out = sys . stdout ) : out . write ( json . dumps ( recordsgen , default = utils . serialize ) ) out . write ( '\n' )
displays the nmap scan result contained in record as json .