path::CodecService¶
-
class
ydk::path::
CodecService
¶
Codec Service, part of YDK path API, which deals with generic path-based YANG data nodes
- virtual std::string
encode
(const std::unique_ptr<DataNode> datanode, EncodingFormat format, bool pretty)¶Encode the given DataNode Tree
Parameters: Returns: The encoded string
Raises:
YCPPInvalidArgumentError
if the arguments are invalid
- virtual std::unique_ptr<DataNode>
decode
(const RootSchemaNode &root_schema, const std::string &buffer, Format format)¶Decode the buffer to return a DataNode
Parameters:
- root_schema – The root schema to use
- buffer – The string representation of the
DataNode
- format – Decode format
Returns: The
DataNode
instantiated ornullptr
in case of error.Raises:
YCPPInvalidArgumentError
if the arguments are invalid.
- virtual
~CodecService
()¶