Thanks!
I guess the logic is:
If you can describe a semantic to the order of elements, then its a list/array,
else should be a map/object.
AFAIK, there is no definition of ordering in kvpairs in DNS-SD, so it should be
e.g.:
kvpairmap = ?{ +kvpair }
kvpair = [ key : str , ?( value: str) }
?? correct ??
Cheers
Toerless
On Wed, Aug 02, 2023 at 09:18:19AM +0200, Carsten Bormann wrote:
> On 2. Aug 2023, at 05:40, Brian E Carpenter <[email protected]>
> wrote:
> >
> > In CDDL, {...} is called a map, in Python and JSON it's called a dictionary.
>
> (In JSON, it is called an object. In Ruby, it’s called a Hash. In Erlang,
> it’s called a Map. Etc.)
>
> > [...] is an array (a.k.a. list).
> > So mainly the {...} isn't ordered and [...] is ordered.
>
> Yes. Maps also are composed of key-value pairs (in JSON, called name/value
> pairs (or members), where the key/name must be a text string), while
> arrays/lists are composed of elements (single data items).
>
> Grüße, Carsten
--
---
[email protected]
_______________________________________________
Anima mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/anima