Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for --json command option #135

Merged
merged 1 commit into from
Aug 26, 2021
Merged

Fix for --json command option #135

merged 1 commit into from
Aug 26, 2021

Conversation

amadejpapez
Copy link
Collaborator

  • --json command option did not work for URLs, emails,... The reason was that forward slash in regex has to escaped with two backslashes. Otherwise it can cause issues with json in some cases. Some regexes already had it this way, but most used just one backslash. (fixes Exception when using --json with email input #126)
  • added a test which runs pyWhat on fixtures/file with --json option, so we can hopefully catch any future issues

I also noticed that --json did not work for MAC addresses and other regexes with "children", because "children" are using Python Sets and json does not work with that type, but this is fixed by #134 as it removes "children" from being printed with the results. :)

@SkeletalDemise SkeletalDemise merged commit 29740b0 into main Aug 26, 2021
@SkeletalDemise SkeletalDemise deleted the fix-json branch August 26, 2021 23:42
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.

Exception when using --json with email input
2 participants