Subject: [ietf-types] Q's regarding development of +json media types

From: Nathan <[email-masked]>
Date: Thu, 30 Sep 2010 20:27:16 +0100

Hi,

I'm currently working on / experimenting with two JSON based 
media-types, the first is a JSON based serialization of Notation 3, the 
other a JSON based serialization of N-Triples.

I've got to the point now where I have implementations of both and need 
to content-negotiate over them, thus my initial question is what media 
type should I use in the interim whilst experimenting?

For a later date, if I were to move towards seeking registration, would 
the best approach be to work on the specifications out with any 
standards body, or to do the work as an internet-draft, or?

Would the recommended approach be to work towards a json-schema approach 
or towards a "+json" type?

And finally, for JSON based media-types do you have any special 
considerations or gotcha's I should be taking in to account at an early 
stage?

Best & TIA for any response,

Nathan

---

From: Kris Zyp <[email-masked]>
Date: Thu, 30 Sep 2010 13:36:54 -0600

On 9/30/2010 1:27 PM, Nathan wrote:
> media-types, the first is a JSON based serialization of Notation 3,
> the other a JSON based serialization of N-Triples.
>
> I've got to the point now where I have implementations of both and
> need to content-negotiate over them, thus my initial question is
> what media type should I use in the interim whilst experimenting?
>
> For a later date, if I were to move towards seeking registration,
> would the best approach be to work on the specifications out with
> any standards body, or to do the work as an internet-draft, or?
>
> Would the recommended approach be to work towards a json-schema
> approach or towards a "+json" type?

These aren't mutually exclusive. JSON Schema doesn't discourage new
+json media types (in fact I think that should be encouraged), it
simply suggests a couple ways that new media types might choose to
reference a json schema.

Anyway, glad to hear of more +json media types in the works.

- -- 
Kris Zyp
SitePen
(503) 806-1841
http://sitepen.com

---

From: Gregg Kellogg <[email-masked]>
Date: Thu, 30 Sep 2010 16:23:33 -0400

I don't think it makes sense to describe JSON serializations of Notation 3 or N-Triples, as these are themselves just serializations of RDF. Perhaps what you're describing is two different JSON serializations of RDF, one which is more closely related to Notation-3 and the other N-Triples. Although, note that Notation-3 is, itself, a super-set of N-Triples (as is Turtle [1]), so is there really a requirement for two different serializations, or isn't it up to the author to chose a particular syntax using different capabilities of the format.

Also, note that Notation-3 is more than a syntax, as it includes behavior as well as representation, which is one reason Turtle was created. A purely syntactic version of Notation-3 is n3-rdf [2], which is a relatively small super-set of Turtle itself.

Does this relate, in anyway to JSON-LD [3], which is also an RDF serialization in JSON?

Perhaps application/rdf+json would be an appropriate mime-type.

Gregg

[1] http://www.w3.org/TeamSubmission/turtle/
[2] See N3-rdf at http://www.w3.org/DesignIssues/Notation3
[3] http://rdfa.digitalbazaar.com/specs/source/json-ld/

On Sep 30, 2010, at 12:27 PM, Nathan wrote:

> _______________________________________________
> ietf-types mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ietf-types

---

From: Sandro Hawke <[email-masked]>
Date: Thu, 30 Sep 2010 16:32:59 -0400

> Perhaps application/rdf+json would be an appropriate mime-type.

When there's a W3C standard for this, in a year or two, sure.  Using
that for one of a dozen experimental candidates doesn't seem like it
would help interop very much.

On the other hand, I don't have a good answer for Nathan's question.
What kind of media type name should one use for a random format that
might be forgotten in 3 months or might take over the world (and be very
widely implemented)?  I can't figure that one out.

     -- Sandro

---

From: Nathan <[email-masked]>
Date: Thu, 30 Sep 2010 22:03:42 +0100

Hi Gregg,

Indeed one is a simple json based serialization of RDF which is very 
similar to N-Triples, and thus not specifically a serialization of 
N-Triples as you say but rather a simple JSON based serialization of RDF 
that shares many similarities with N-Triples, the same feature set if 
you will.

The N3-like JSON serialization (JSN3) started out life as 
yet-another-json-rdf serialization which was Turtle-like, however soon 
had Graph Literals added at the request of Tim Berners-Lee, who then 
swiftly followed up with another request to make it fully round-tripable 
with Notation-3 and thus to express/serialize everything Notation-3 
does. Similarly this now means that a subset of it could be used as a 
Turtle-like JSON serialization of RDF, or even an AMORD-in-RDF-like 
serialization (which is basically Turtle + Quoting) - Will cross that 
bridge later though!

With regards relating to JSON-LD, in some ways yes, as in Manu and I 
have discussed at length and gone over the design choices of both 
JSON-LD and JSN3, and also the various other JSON based serializations 
of RDF which are in the wild & feedback has been gained from many who 
work heavily with RDF, N3 and JSON - and of course much more expected 
and welcomed!

Best,

Nathan

---

From: Nathan <[email-masked]>
Date: Thu, 30 Sep 2010 22:12:43 +0100

> would help interop very much.

Exactly, couldn't have said it better! I'd be keen to avoid 
application/(x-)(rdf+)json all together for what I'm working on.

> widely implemented)?  I can't figure that one out.

Snap, hoping somebody like Ned can give guidance :) (or anybody who has 
more of a clue than I do!)

Best,

Nathan

---

From: Sandro Hawke <[email-masked]>
Date: Fri, 01 Oct 2010 00:13:49 -0400

On Thu, 2010-09-30 at 16:40 -0400, mike amundsen wrote:
> Experimental types should use the "prs" facet[1].
> 
> Vendor-specific types (non experimental, etc.) should use the "vnd" facet[2].
> 
> [1] http://tools.ietf.org/html/rfc4288#section-3.3
> [2] http://tools.ietf.org/html/rfc4288#section-3.2

Thanks for the pointer, and perhaps I'm being dense, but I still don't
see what subtree a developer, like Nathan, who is in the early stages of
potentially creating a standard should use.  It seems wrong to use vnd,
since he's not a vendor and (at least in this hypothetical) has no
intention of ever creating a product here, commercial or otherwise.  It
seems wrong to use prs, since that would associate the media type
forever with him, even though he might lose interest in a year, while a
community processes takes it over.

It seems like there's no name he can use when starting out that will
continue to be sensible years down the road, if the type becomes widely
adopted, perhaps being blessed by a standards body.  Is that the state
of the art, that you just have to plan to change the media type at some
point?

    -- Sandro

> mca
> http://amundsen.com/blog/
> http://twitter.com@mamund
> http://mamund.com/foaf.rdf#me
> 
> 
> #RESTFest 2010
> http://rest-fest.googlecode.com
> 
> 
> 
> 
> On Thu, Sep 30, 2010 at 16:32, Sandro Hawke <[email-masked]> wrote:

---

From: mike amundsen <[email-masked]>
Date: Fri, 1 Oct 2010 00:58:09 -0400

<snip>
> of the art, that you just have to plan to change the media type at some
</snip>

Yes, AFAIK, that is correct. If you want it blessed by the standards
body, you need to use a name in the standards tree and go through the
standards process.

While I can't speak from experience (surely there are others on this
list who can), I suspect a valid pattern to follow is to register a
"prs" or "vnd" media type id (as appropriate to your circumstance) and
then, as things get popular, adopt a new standards-level media type id
and register that one separately.

This process will result in two media types, one of which can
eventually be deemed "Obsolete [2] (since registered types cannot be
deleted).

FWIW, I left out the doc's reference to the "x." and "x-" facets[1]
which might appeal to some despite the "discouragement" voiced in the
doc. I've seen new media types adopted using this "x" pattern by both
persons and vendors.

[1] http://tools.ietf.org/html/rfc4288#section-3.4
[2] http://tools.ietf.org/html/rfc4288#section-10

mca

#RESTFest 2010