> I think you did this manually, right? Yes. To my best understanding of YANG and YANG-JSON. (E.g., I needed to find out how to represent empty lists in YANG-JSON — this was recently (2022!) still a discussion point on the mailing list, which needed the author of RFC 7951 to resolve [1]...)
[1]: https://mailarchive.ietf.org/arch/msg/netmod/Jlgpucc0wI6YpCIuXk6k1gicjsE I think one needs to do a couple of translations by hand, before it becomes clear what an automatic translator needs to do. And there are limits, e.g., there is a co-occurrence constraint expressed in English that is trivial to express in CDDL and, in a different way, certainly also in YANG (with the `when` stuff), but translating the latter automatically into a grammar based co-occurrence constraint sounds heroic. I’d probably start by translating a yang tree into CDDL and then filling in the things the YANG tree is missing from the YANG. >> [1]: >> https://www.ietf.org/archive/id/draft-bormann-cbor-rfc-cddl-models-00.html > > 2.4. Your favorite RFC here... > > RFC8366. Good idea. Let’s see when I get to it… (I actually need to do translations like this as a therapeutic so I get a better understanding of what a draft is trying to say(*)…) > Not seeing a venu for your draft. I’d expect that draft to be looked at both in CBOR and by subject matter experts. I’m focusing a bit on documents in late stages because the translation might actually help others understand a draft as well. > The thing is, once it gets translated to CDDL, I'm actually not sure I want > to keep the YANG anymore. I feared that this would come up. I’m not so interested in setting up an adversarial relationship between a YANG and a CDDL faction. But, indeed, there are some things where one or the other can be intrinsically better (YANG: data at rest with RPCs on them etc., CDDL: data in flight…). The question is just in which cases this is outweighed by a still much stronger industry ecosystem around YANG. > A huge huge huge amount of effort on our part, for > almost zero benefit. We didn't really have CDDL 8 years ago, so we had no > clear > alternative when we started, but I sure wouldn't go down the YANG path again. RFC8366 clearly looks like a rather natural application of CDDL to me. Grüße, Carsten (*) Or hide... _______________________________________________ Anima mailing list [email protected] https://www.ietf.org/mailman/listinfo/anima
