Small refactoring
Connect can parse JSON.