Use json as sync exchange format

This allows us to easily transmit headers too. I kind of tried to
rebuild the node response object to reduce changes on any other code.
Fix test data to match assert in tests