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

Json data pack validation errors don't show line numbers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.15.2, 20w22a, 1.16 Pre-release 3, 1.16.2
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Data Packs

      Description

      The bug

      When a file in a data pack has malformed Json, it shows an error including the line number and the path.

      com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 9 column 20 path $.pools[0].entries[0].name

      However when the Json is valid, but contains another validation error, it doesn't provide this same info. Yet this is vital to debug errors.

      com.google.gson.JsonSyntaxException: Expected name to be an item, was unknown string 'minecraft:foo'

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Misoloo [Helper] Misode
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: