Snapshot 18w02a: How do you set a custom name for an entity through commands?

So I have tried for a while now to set a custom name for an entity using snapshot 18w02a, but it won't allow it to spawn. the command is: /summon villager ~ ~1 ~-3 {NoAI:1b,Invulnerable:1b,Silent:1b,CustomName:"test",CustomNameVisible:1b,Team:"plr1",Proffesion:0,Career:1,Offers:{Recipes:[]}} When trying to use that all I get is a message that says Unable to summon entity. Does anyone know if maybe it is a formatting change that occurred or if the way you do custom names is different. I looked into the NBT after having tried for a while and found that the tag was still labeled CustomName. So I'm confused as to what has changed.


In addition to Fabian's answer: The CustomName in 18w02a no longer takes a string as argument, but a json text component. Your tag would look as follows:

CustomName:"{\"text\":\"test\"}"

For all details, I refer you to this minecraft forum post.