Subject: [Asdf] sourcecode type="json"

From: Carsten Bormann <[email-masked]>
Date: Tue, 26 Oct 2021 21:26:33 +0200

https://www.ietf.org/archive/id/draft-ietf-asdf-sdf-08.html

includes a number of JSON examples, or at least it claims so.

We created 15 examples that are marked »<sourcecode type=“json”>«.  Of these, 3 are JSON, and 12 are a single member (or two) without surrounding braces, meant to be put into larger JSON objects.

E.g.:
https://www.ietf.org/archive/id/draft-ietf-asdf-sdf-08.html#section-3.2-6

These braces can of course be added, but they are really noise distracting from the content that is in these members (and the objects formed this way may be valid JSON, but they usually aren’t valid SDF).

Should we introduce a new sourcecode type “json-members”?
Or should we bite the bullet and add the noise to get real JSON texts?

Grüße, Carsten

---

From: Pete Cordell <[email-masked]>
Date: Tue, 26 Oct 2021 21:18:58 +0100

> Or should we bite the bullet and add the noise to get real JSON texts?

For a fragment of something bigger in free-form text I'd add ellipsis 
either side, e.g.:

    ...
    "namespace": {
      "cap": "https://example.com/capability/cap",
      "zcl": "https://zcl.example.com/sdf"
    },
    "defaultNamespace": "cap",
    ...

Is there not a precedent using things other than JSON (such as code 
samples) that offers guidance on whether to keep with a type="json" or 
add a new type?

HTH,

Pete.
-- 
---------------------------------------------------------------------
Pete Cordell
Codalogic Ltd
Read & write XML in C++, http://www.xml2cpp.com
---------------------------------------------------------------------

---

From: Mark Nottingham <[email-masked]>
Date: Wed, 27 Oct 2021 09:58:09 +1100

For http, we use 'http-message', which is defined to be either a full *or* partial message. Remember, this is not a media type...

> On 27 Oct 2021, at 6:26 am, Carsten Bormann <[email-masked]> wrote:
> 
> _______________________________________________
> json mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/json

--
Mark Nottingham   https://www.mnot.net/