For me the fix was really simple - change "wrap off" to "wrap on". To be honest, I don't know, and can't find documentation as to what this option does.
mto: There is documentation for the rest connector (here), but no mention of what the "wrap" options for JSON actually do. Is there somewhere we can find this?