-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Labels
Description
Hello! Does clixon support sending notification events formatted as JSON?
I can't make it work with following YANG-definition:
notification entity-status {
leaf state {
type enumeration {
enum ONLINE;
enum OFFLINE;
enum UNKNOWN;
}
mandatory true;
}
}
And corresponding XML that is returned by callback:
<event xmlns="urn:example:events">
<entity-status xmlns="urn:example:events">
<state>ONLINE</state>
</entity-status>
</event>
I do subscribe to event stream with this command:
curl -X GET -H "Accept: text/event-stream" -H "Cache-Control: no-cache" -H "Connection: keep-alive" http://localhost:8080/streams/entity-status
But it returns XML instead of JSON:
data: <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2025-01-01T00:00:01.000000Z</eventTime>
<event xmlns="urn:example:events">
<entity-status xmlns="urn:example:events">
<state>ONLINE</state>
</entity-status>
</event>
</notification>