Skip to content

Conversation

amandasaurus
Copy link
Collaborator

Otherwise the array values will be null, which will show up as nulls in the tirex-status --raw output.

I am not 100% sure if this is correct. and would appreciate feedback. I am also not a very skilled Perl programmer, and would appreciate feedback & suggestions on how I solved this issue. (i.e. feel free to rewrite it to be idomiatic, or correct)

fixes #29

Otherwise the array values will be null, which will show up as nulls in
the tirex-status --raw output.

fixes openstreetmap#29
Copy link
Collaborator

@woodpeck woodpeck left a comment

Choose a reason for hiding this comment

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

Would it perhaps be easier to leave the "null" values in, and simply convert to integer on output?

@amandasaurus
Copy link
Collaborator Author

amandasaurus commented Sep 12, 2024 via email

@stoecker
Copy link
Contributor

In Tirex::Status->read() you could iterate over the relevant fields and replace null by 0. That would only affect the output.

@woodpeck woodpeck merged commit 6e9879e into openstreetmap:main Sep 13, 2024
@amandasaurus amandasaurus deleted the tirex-status-json-rm-incorrect-nulls branch March 12, 2025 13:31
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.

tirex-status returns null in JSON instead of 0
3 participants