4

Which version of macOS (OS X) first included -json switch in system_profiler?

1 Answer 1

5

It was introduced in Catalina.

JSON wasn’t standardized until 2013 and Apple rarely implements new technology that hasn’t been standardized. Looking at a man page from 10.9 (Mavericks) which was also released in 2013, the -json flag was not available.

It’s also not available in Mojave as the man page for that version doesn’t indicate the flag either. I’ve tested it in Catalina and confirmed it exists there

4
  • 2
    I can confirm it's not in Mojave - there is -xml option, but no -json option. (Sometimes there can be undocumented options, so wanted to check the utility itself.) Apr 15, 2020 at 16:21
  • @Allan, do you know when -xml switch was added?
    – tunafish24
    Apr 16, 2020 at 6:42
  • I would have to check, but I believe it was in Mountain Lion. I’ve got Tiger, so I’ll check that this weekend.
    – Allan
    Apr 16, 2020 at 9:53
  • Actually nevermind, I found documentation from 2012 which mentions -xml switch, so its good enough for me.
    – tunafish24
    Apr 16, 2020 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .