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

jtimon current code is not giving true json formatted output for option --json #50

Open
chagantvj opened this issue Oct 15, 2024 · 1 comment

Comments

@chagantvj
Copy link

jtimon current code is not giving true json formatted output for option --json
Please fix this and provide new code.

@nileshsimaria
@amohit1315

@chagantvj
Copy link
Author

Actual JSON output format:

{
"source": "[2001:4860::192:168:0:250]:10162",
"subscription-name": "default-1728945794",
"timestamp": 1728945763082539583,
"time": "2024-10-14T22:42:43.082539583Z",
"prefix": "components/component[name=FPC0:CC0]",
"updates": [
{
"Path": "properties/property[name=ts-input-packets]/state/value",
"values": {
"properties/property/state/value": 19713205
}
},
{
"Path": "properties/property[name=ts-output-packets]/state/value",
"values": {
"properties/property/state/value": 60163185
}
},
}

Its coming with out proper indentation and also with out double quotes for each leaf and value.
Current Output Format:

system_id: ccl-bal-r2-scapa
component_id: 65535
sensor_name: sensor_1724
subscribed_path: /lldp/
streamed_path: /lldp/
component: l2cpd
sequence_number: 1048576
export_timestamp: 1727674760022
update {
timestamp: 1727674760012459357
update {
path {
elem {
name: lldp
}
elem {
name: state
}
elem {
name: enabled
}
}
val {
bool_val: true
}
}
update {
path {
elem {
name: lldp
}
elem {
name: state
}
elem {
name: hello-timer
}
}
val {
uint_val: 30
}
}

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

No branches or pull requests

1 participant