Minecraft wiki entry for NBT_format, associated text: The requested data tags in the target entity/block/storage must match exactly for the provided tags to pass, including the data type (e.g. 1, an int, will not match 1d, a double). Namespaces also can't omitted because in NBT object it is just a plain string that won't be resolved into a resource location (e.g. @e[nbt={Item:{id:"stone"}}] will not match a stone item entity, it must be @e[nbt={Item:{id:"minecraft:stone"}}]). The same is true for string of JSON text, which must be exactly the same to match the provided tag (e.g. @e[nbt={CustomName:'"a"'}] will not match any entity, it must be @e[nbt={CustomName:"{\"text\":\"a\"}"}] or @e[nbt={CustomName:'{"text":"a"}'}]).