new json communication
sanity check to prevent DoS attacks