def bundle_to_json(fh):
 hg_unbundle10_obj = readbundle(get_configured_ui(), fh, None)
 groups = [group for group in unpack_groups(hg_unbundle10_obj)]
 return json.dumps(groups, indent=4)

def bundle_to_json ( fh ) : hg_unbundle10_obj = readbundle ( get_configured_ui ( ) , fh , None ) groups = [ group for group in unpack_groups ( hg_unbundle10_obj ) ] return json . dumps ( groups , indent = 4 )
convert the received hg10xx data stream to a json object .