I am playing with tellraw to tell a message to the player. After solving all the common errors, and the code is correct, the JSON just gives up. I get an Invalid json: message. There is no error, but JSON just tells there's an error, then shows nothing. How can i fix this?

I'm running Minecraft 1.8.9.

The command is /tellraw @p {"LED TV starting":"#2","blue":"#3"}

  • 4
    You have to include the exact command you're using that's causing you problems. – Skylinerw Dec 27 '15 at 21:29
  • It seems that "After solving all the common errors", there are still some uncommon errors left. Please, post the exact command so others can execute the command on their own and try to find any issues. – Kcats Dec 28 '15 at 9:15
  • 2
    The command you've posted is not "correct". What exactly are you trying to make it output? Kind of hard to tell. What are the numbers for? Do you want "#3" to be in blue, or is "blue" its own word meant to be outputted? – SirBenet Dec 28 '15 at 17:22

That command, while valid JSON in itself, makes absolutely no sense in the context of Minecraft.

JSON works by assigning values to specific keys, e.g. the "blue":"#3" in your command assigns a value of "#3" to the key "blue". What happens with the JSON is determined by the interpreter (in this case: Minecraft), which knows how to process certain, specific keys. "blue" and "LED TV starting" are not valid keys in this context, and are simply ignored by the game, hence the error.

An example of valid JSON within the context of Minecraft tellraw would be

{"text":"Hello World!","color":"blue"}

In this case, the keys are "text" and "color", both of which Minecraft knows how to process. There are many more valid keys, such as "bold" or "clickEvent", all of which pose limitations on their values as well (e.g. "color":"banana" doesn't work).

I suggest looking at automated JSON generators like the one on minecraftjson.com and play around a bit. Once you have seen a couple of valid Minecraft JSON, you should be able to understand how they work and creating your own by hand will be much easier (or just keep using a generator forever).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.