[Bug 197499] wc libxo emits invalid JSON when used on multiple files

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Feb 10 20:33:50 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197499

--- Comment #5 from Marcel Moolenaar <marcel at FreeBSD.org> ---
I don't seem to be able to reproduce your problem:

fbsdvm64% wc --libxo json,pretty /etc/defaults/*
{
  "wc": {
    "file": [
      {
        "lines": 111,
        "words": 644,
        "characters": 3999,
        "filename": "/etc/defaults/bluetooth.device.conf"
      },
      {
        "lines": 87,
        "words": 403,
        "characters": 2439,
        "filename": "/etc/defaults/devfs.rules"
      },
      {
        "lines": 381,
        "words": 1221,
        "characters": 11568,
        "filename": "/etc/defaults/periodic.conf"
      },
      {
        "lines": 699,
        "words": 4593,
        "characters": 36522,
        "filename": "/etc/defaults/rc.conf"
      }
    ],
    "total": {
      "lines": 1278,
      "words": 6861,
      "characters": 54528,
      "filename": "total"
    }
  }
}
fbsdvm64% 

"file" is a proper array and "total" falls outside of the array. jsonlint.com
flags this as valid JSON.

I'm running sources as of today.

Do you have older sources or modified sources?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list