Don't filter redundant info from JSON output
1 unresolved thread
1 unresolved thread
Don't filter redundant info from JSON output
In order to make JSON output more uniform, do not filter out info that can be considered redundant for single host IPs.
Does not affect regular (non-JSON) output.
Before:
$ ipcalc --json 127.0.0.1
{
"ADDRESS":"127.0.0.1",
"ADDRSPACE":"Loopback"
}
After:
$ ipcalc --json 127.0.0.1
{
"ADDRESS":"127.0.0.1",
"NETWORK":"127.0.0.1",
"NETMASK":"255.255.255.255",
"PREFIX":"32",
"BROADCAST":"127.0.0.1",
"ADDRSPACE":"Loopback",
"MINADDR":"127.0.0.1",
"MAXADDR":"127.0.0.1",
"ADDRESSES":"1"
}
Resolves #21 (closed).
Edited by Carl Smedstad
Merge request reports
Activity
1 1 { 2 2 "ADDRESS":"127.0.0.1", 3 "HOSTNAME":"localhost", changed this line in version 2 of the diff
Sorry, my bad. Did not notice that. Fixed in ad6933f5.
Edited by Carl Smedstad
I reduced the scope of some variables since my linter complained about it. Not a C guru by any means, but from what I understand it's an improvement.
Also added a
.editorconfig
to configure my editor to use tabs for indentation.If any of these commits are unwanted or out of place I'll drop them.
mentioned in commit f6d0a124
Please register or sign in to reply