/tellraw - How do you make a hover event show an item?

To get the item from a "/give" style NBT format to a "/replaceitem" style JSON format, you have to actually change quite a bit:

  • You have to escape the quotation marks (but I think you know that already)
  • You have to escape the backslashes: \\\"
  • You have to add the "id" tag to indicate that it should be a bow: "id":"bow"
  • You have to add the "Count" tag so that it isn't a 0-stack: "Count":1
  • You have to put the item NBT into the "tag" tag: "tag":{"display":...}
  • In 1.14 Name and Lore are JSON as well, so now you have quotes in JSON in JSON and the amount of backslashes grows to seven in a row.

/tellraw @p {"text":"Test","hoverEvent":{"action":"show_item","value":"{\"id\":\"bow\",\"Count\":1,\"tag\":{\"display\":{\"Name\":\"{\\\"text\\\":\\\"\\\\\\\"Send Zombies To Mars\\\\\\\" Bow\\\"}\",\"Lore\":[\"{\\\"text\\\":\\\"Knockback MMMM\\\"}\",\"{\\\"text\\\":\\\"Costs 40 Points\\\"}\"]},\"ench\":[{\"id\":49,\"lvl\":5}],\"Unbreakable\":\"1\"}}"}}