Skip to content

Conversation

gabebear
Copy link

#125

passing --json when running detection will output json dictionaries for each device detected.

passing --json when running detection will output json dictionaries for each device detected.
@gabebear gabebear changed the title Add JSON Output option Add JSON Output Option Apr 25, 2019
@shazron
Copy link

shazron commented May 7, 2019

I just tested this, -j doesn't work, but --json works.
You'll need to add a j to the format string here:

while ((ch = getopt_long(argc, argv, "VmcdvunNrILeD:R:i:b:a:s:t:g:x:p:1:2:o:l::w::9::B::W", longopts, NULL)) != -1)

@shazron shazron added this to the 1.10.0 milestone May 7, 2019
@gabebear
Copy link
Author

gabebear commented May 7, 2019

oops, I'd added that "::j" to a different branch when I was testing...

int ch;

while ((ch = getopt_long(argc, argv, "VmcdvunNrILeD:R:i:b:a:s:t:g:x:p:1:2:o:l::w::9::B::W", longopts, NULL)) != -1)
while ((ch = getopt_long(argc, argv, "VmcdvunNrILeD:R:i:b:a:s:t:g:x:p:1:2:o:l::w::9::B::W::j", longopts, NULL)) != -1)
Copy link

@shazron shazron May 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would append the string with j instead of appending ::j. The effect here is you are specifying W::, that -W takes an optional parameter. I know that this opt string stuff is not exactly intuitive... (you could also prepend the string with j, same effect)

Also moves "-W" to same section of string with other no-arg options (Makes it easier to remember that "::" after a parameter means something, not before it).
@shazron shazron merged commit ea55833 into ios-control:master May 9, 2019
@shazron shazron changed the title Add JSON Output Option feat: add JSON Output Option Jul 18, 2019
geekonion pushed a commit to geekonion/ios-deploy that referenced this pull request Jun 29, 2023
* Add JSON Output option

* passing --json when running detection will output json dictionaries for each device detected.
* add -j option to check

Also moves "-W" to same section of string with other no-arg options (Makes it easier to remember that "::" after a parameter means something, not before it).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants