Socialwg/Media type for AS2

From W3C Wiki

Relevant issue:

Two alternative media types are discussed:

See also these issues (both were closed):


elf-pavlik: "could you share with us some some clear examples where you see using [JSON-LD] profile [instead of a new AS2 media type] could come as disadvantage?" (

elf-pavlik: "just to clarify, do you see any use cases which require that application/activity+json response does NOT conform to JSON-LD spec? In other worlds [words], while we do NOT require JSON-LD processing, do we want it to fail if someone does try to process it as JSON-LD?" (

How important is it for a media type used by AS2 to imply a JSON-LD context? (See issue Andreas Kuckartz (talk)

Why was this issue closed ? can media type specify default JSON-LD context? Andreas Kuckartz (talk)

Arguments in favor of application/activity+json

  • sandro: Does conneg on profiles really work? James says it's often absent or buggy

Arguments in favor of application/ld+json (using an AS2-specific profile)

  • Andreas Kuckartz: A new media type is not necessary but creates additional work for those who want to process JSON-LD as "just JSON-LD". This is about better interoperability between AS2 and the more general JSON-LD (and RDF) uses which are common in the Linked Data community. Andreas Kuckartz (talk)
  • Melvin Carvalho: application/ld+json would allow interoperability with a host of solutions including SoLiD and others that are adopting this format, including many firms, and W3C groups. More importantly, it's the only JSON serialization that is a W3C REC. Is there any reason to make a new media type, in terms of current adoption? Melvin Carvalho (talk)
  • dret (on implicit AS2 context): "anything that means that people cannot use off-the-shelf (i.e., non-AS-aware) JSON-LD components should be avoided. i don't know if many/most JSON-LD components allow the "injection" of external contexts, but if they do, then this is kind of ok. but it's still a horrible hack, imho, because this does go down a path where AS is not just JSON-LD, but some variant that requires special processing." (
  • Manu Sporny : Have you guys considered application/ld+json+activitystreams? Isn't that the way you're supposed to subtype? @shepazu and I were hallwaying this at W3C TPAC, he mentioned that might be a good compromise. I'm still supportive of using the profile parameter instead, but if you do decide to mint a new MIMEtype, why aren't you saying that the data is basically application/ld+json plus a few constraints? ( )


A URL needs to be defined for the serialization specified in the AS2 specification.

Ideally can be used. But then it is difficult to inform non-JSON-LD processors that the data is AS2.

In the future dereferencing this URL could result in a machine readable Frame ( That might help to solve the "crystalization" issue described by Henry Story. Until then JSON-LD processors need to have out-of-band information about this profile.

Iterop Considerations - application/ld+json

Current Adopters

  • Bing
  • Yahoo
  • Google Search
  • Yandex
  • BBC
  • OpenLink
  • DBPedia
  • Payswarm
  • Stanbol
  • DPLA
  • Symfony
  • Vie
  • Helios
  • IKS
  • IMS Global
  • Beakit
  • Github
  • Gmail


  • Linked Data Platform based systems
  • Solid based systems
  • Open Annotations (possibly?)
  • Mozilla Open Badges (possibly?)

Interop Considerations - application/activity+json

  • Please add present and future possible deployments

Interop Considerations - AS2 and JSON LD

James Snell: None of the core vocabulary properties break with JSON-LD. AS2, however, does allow for extensions (such as GeoJSON) that are not JSON-LD compatible and currently warns against their use for exactly that reason (that's why the Place object has properties defined for instance). Even with those warnings, however, such non-JSON-LD compatible extensions are permitted under the AS2 "must ignore" policy for extensions that an implementation may not understand and implementations are required not to throw an error if such things are found.



Abstract from WG Note (direct quote)

"The Resource Description Framework (RDF) is a framework for representing information in the Web.

This document defines a textual syntax for RDF called RDF/JSON that allows an RDF graph to be completely written in a form compatible with the JavaScript Object Notation (JSON) [RFC4627] and alternative to the one recommended in JSON-LD [JSON-LD].

The syntax defined in this document should not be used unless there is a specific reason to do so. Use of JSON-LD is recommended."