Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-3173

server-side json parser does not handle whitespace properly

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.5
    • 1.8.4rc1
    • Server (S)
    • None

      Consider the following JSON for file system discovery:

      {
      "vfs.fs.type.discovery":[

      { "

      {#FSNAME}":"\/", "{#FSTYPE}":"rootfs" },
      { "{#FSNAME}

      ":"\/sys", "

      {#FSTYPE}":"sysfs" },
      { "{#FSNAME}":"\/proc", "{#FSTYPE}

      ":"proc" },
      { "

      {#FSNAME}":"\/dev", "{#FSTYPE}":"devtmpfs" },
      { "{#FSNAME}

      ":"\/dev\/pts", "

      {#FSTYPE}":"devpts" },
      { "{#FSNAME}":"\/", "{#FSTYPE}

      ":"ext3" },
      { "

      {#FSNAME}":"\/lib\/init\/rw", "{#FSTYPE}":"tmpfs" },
      { "{#FSNAME}

      ":"\/dev\/shm", "

      {#FSTYPE}":"tmpfs" },
      { "{#FSNAME}":"\/home", "{#FSTYPE}

      ":"ext3" },
      { "

      {#FSNAME}":"\/tmp", "{#FSTYPE}":"ext3" },
      { "{#FSNAME}

      ":"\/usr", "

      {#FSTYPE}":"ext3" },
      { "{#FSNAME}":"\/var", "{#FSTYPE}

      ":"ext3" },
      { "

      {#FSNAME}

      ":"\/sys\/fs\/fuse\/connections", "

      {#FSTYPE}

      ":"fusectl" }

      ]
      }

      Our JSON parser requires that there is no whitespace around the colon. If there is whitespace, server says "Wrong data in JSON.", which is not a very helpful error message.

      We should improve our JSON parser so that we are more helpful to users wishing to implement their own discoveries in 2.0.

            Unassigned Unassigned
            asaveljevs Aleksandrs Saveljevs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: