serialize beacons to jsonlike string.