send json back and forth