Project

cddlc

0.0
The project is in a healthy, maintained state
cddlc implements converters and miscellaneous tools for CDDL, RFC 8610
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies

Development

Runtime

 Project Readme

CDDL conversion utilities

This little set of tools provides a number of command line utilities for converting to and from cddl.

0.0.2

Installation

gem install cddlc

Formats

cddlc knows the following formats:

  • .cddl: CDDL as defined in RFC8610
  • .cddlj: JSON form of CDDL (the YIN to the YANG)
  • .cddly: The same JSON form, but serialized in YAML.

These targets are identified by -t cddl, -t json (with -t neat invoking a different prettyprinter), -t yaml. These can be abbreviated (but don't do that in scripts).

With -t enum, cddlc generates C-style enumeration type declarations from integer keys used in a map.

Apart from creating enum declarations, the current version only can transform from input CDDL to one of the JSON/YAML formats of CDDL.

Command line utilities

  • cddlc foo.cddl > foo.cddlj
  • cddlc -tyaml foo.cddl > foo.cddly
  • cddlc -ty foo.cddl > foo.cddly

Output is to stdout, input from one or more files given as command line arguments (use - for standard input).