Skip to content

vtysh not returning valid json when xpath does not exist and specified json format #21479

@rhagelstrom

Description

@rhagelstrom

Description

When running the following to query an xpath that doesn't exist the result isn't json but the string "(null)". I would expect the output returned would be valid json.

show mgmt datastore-contents running xpath json

Version

10.4.3

How to reproduce

From vtysh run the following with an xpath that doesn't exist.

show mgmt datastore-contents running xpath json

Expected behavior

The value returned is a string
(null)

I'd expect valid json, maybe {}

Actual behavior

The output is not valid json
(null)

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds further investigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions