How can I summon a villager that sells nothing for something?

I want to summon a villager that sells nothing when you sell to him something. For example:
/summon Villager ~ ~1 ~ {Silent:1,NoAI:1,Offers:{Recipes:[{maxUses:1,buy:{id:"minecraft:flint",Count:1},sell:{id:"",Count:0,Damage:0}}]}}
So when I sell him flint, I will get nothing in return. The only problem is whenever I make the trade, my game crashes. The only way I can really think of doing this is by selling a random item (Like TNT) and have a command block on a clock clear that item. But I would rather to use that as a last resort. Any help would be great. Thanks.
Best Answer
You cannot set empty NBT tag nor set something to zero count.
Make it another way - Sell two items and let him give you back the one of it - "renewable token".
So you will sell "anything" + "item you want to sell" , and get "anything" back. Yup, you just lost that thing you wanted to get rid of.
/summon Villager ~ ~1 ~ {Silent:1,NoAI:1,Offers:{Recipes:[{maxUses:7,buy:{id:"minecraft:flint",Count:1},buyb:{id:"minecraft:stone",Count:1},sell:{id:"minecraft:stone",Count:1}}]}}
PS: buyb is the second buy tag, as I remember, cannot check now from work :)
Pictures about "How can I summon a villager that sells nothing for something?"



How do you summon a villager with no trades?
How to Enter the CommandHow do you summon villagers with certain trades?
First, you need to program the command block to summon a villager with the /summon command. This /summon command will be run each time the command block is activated. So, stand in front of the command block with your pointer (the plus sign) on the command block and click on the right mouse button.How To Make Custom Villager Trades in Minecraft 1.14
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: ANTONI SHKRABA, Towfiqu barbhuiya, Marsel Hasanllari, Ylanite Koppens