If you try to set a commandblock with /setblock with the DataTag Command:"", it won't place the block and outputs an error message:
Data tag parsing failed: Expected '{' but got '@' at: @<--[HERE]
I used the command:
/setblock ~ ~1 ~ minecraft:command_block 0 {Command:"/tp @a ~ ~ ~"}
as an example.