Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-200361

Unexpected error in parsing JSON component

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w40a
    • 1.16.3, 21w03a, 21w06a, 1.19, 1.19.3, 1.19.4 Pre-release 1
    • None
    • Confirmed
    • Commands

      As normal, when you let the game attempt to parse a JSON text component, such as the following:

      tellraw @s []
      

      It correctly recognises that the component is empty, and displays an error:

      However, if you construct a component like the following:

      tellraw @s ["foo",[]]
      

      It does not notice that anything is wrong until execution - likely assuming that since one of the elements of the array is resolvable, the input is validated.

      However, due to the nature of JSON components, any elements of a component array must be resolvable, including the arrays themselves - hence the following error:

      This as-is looks quite strange and can be confusing to players who are new using commands, as the error is not immediately clear.

       To elaborate on this, if the second array becomes valid, then it passes with no issue:

       

       

       

            Unassigned Unassigned
            SirSheepe SirSheepe
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: