Skip to content

Fix for --json command option#135

Merged
SkeletalDemise merged 1 commit intomainfrom
fix-json
Aug 26, 2021
Merged

Fix for --json command option#135
SkeletalDemise merged 1 commit intomainfrom
fix-json

Conversation

@amadejpapez
Copy link
Copy Markdown
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