moving JSON handling over from hotbox