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

Fixed #4 - avoid generating empty fields in JSON outputs #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sebastianjin
Copy link

This PR is about not displaying a certain field (country, city, asn, etc.) in the JSON output when the corresponding flag was not present. This was done by using the feature of pointers such that, when the pointers are written to a JSON file, they will be ignored if they have a value of nil. Otherwise, the field key will be created, and the value will be written into the entry.

This modification aims to improve the readability of the output and reduce the cost of uploading JSON files to BigQuery.

…ot displaying an empty field when the corresponding flag was not specified
@sebastianjin sebastianjin linked an issue Jul 8, 2021 that may be closed by this pull request
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.

avoid outputting 0 and empty strings in the JSON output
1 participant