Skip to content

Interface: ToJsonOptions ​

Defined in: netconf/src/operations/json.ts:81

Options of the conversion seam, ExtensionContext.toJson.

Extends ​

Properties ​

datastore? ​

ts
readonly datastore?: JsonDatastore;

Defined in: netconf/src/operations/json.ts:87

The datastore the data came from, which picks the schema: running, candidate, startup, operational (the default), or an NMDA datastore identity.

Overrides ​

JsonOptions.datastore


hint? ​

ts
readonly hint?: string;

Defined in: netconf/src/operations/json.ts:100

Text appended to the conversion's failure messages and schema-less warnings, such as how to read the data another way. Reads that have a format option pass READ_AS_XML_HINT.


operation? ​

ts
readonly operation?: string;

Defined in: netconf/src/operations/json.ts:109

Convert an RPC's or action's output instead: data is the reply (or any element holding the output parameters), and the result is the output parameters, named as inside the operation. The value is the operation's data path, in the form /ex:restart or /ex:servers/server[name='a']/reset (module prefix only where the module changes). The datastore defaults to operational.


requireSchema? ​

ts
readonly requireSchema?: boolean;

Defined in: netconf/src/operations/json.ts:31

Refuse to convert data without a YANG schema: reject with a SchemaUnavailableError (no schema could be built) or a YANG data error (the data doesn't match the schema), instead of converting that subtree schema-less and reporting a warning. For JSON input (config or filter), reject with SchemaUnavailableError instead of sending a member no schema covers schema-less. Default: the connection's yang.requireSchema, then the device profile's, then false.

Inherited from ​

JsonOptions.requireSchema


scope? ​

ts
readonly scope?: ReadonlyMap<string, string>;

Defined in: netconf/src/operations/json.ts:94

Namespace prefixes declared above the data element (prefix → URI), for prefixes used in values. Not needed for a parsed element, which carries every declaration in scope where it was parsed (inScope); only for an element built with x() whose values use a prefix declared elsewhere.


validate? ​

ts
readonly validate?: boolean;

Defined in: netconf/src/operations/json.ts:39

JSON input only: refuse JSON that doesn't match its YANG schema (unknown nodes, values of the wrong type or out of range, missing list keys, config-false nodes in an edit), rejecting with a YANG data error that lists every problem. Default true. With false, a top-level member that doesn't match is sent schema-less, with a warning.

Inherited from ​

JsonOptions.validate

Released under the MIT Licence.