Exploring an Open Spec for JSON Document to Document Transforms

29th Jun 2023

I've been doing a lot of research recently for Uniform on how to we might extract key data from API responses based on what type of information the current context is looking for.

For example, when you call a products listing API from some headless commerce system you might be doing so because you are interested in a list of product titles and prices. You might equally, just be interested in a set of product images. Ultimately, it would be great to transform from a concrete API implementation to something which is: more generic, open and appropriate for the context in which you are consuming the data.

We already have a bunch of open schemas in the wild which are there to enable collaboration between systems. Wouldn't it be great to have an open spec which would enable APIs to provide document to document transformation descriptions?

[Edit]: See Follow up on JSON Document to Document Transforms

Linked Data? Fediverse?

Looking into this, I keep coming across very similar efforts, there is schema.org and RDF, FOAF. The JSON LD spec also seems very applicable here. My search has also led me into some of the Fediverse specs, I am wondering if there is already something there which is trying to solve this problem.

In the world of composed headless services, that website page that you have glued together seems to me like another piece of federated content.

It's surely worth our efforts to find a common protocol for federated content

It's surely worth our efforts to find a common protocol for federated or composed content which also transforms the source into another schema.

The number of platforms and services which are adding content graphs, remote sources and the like seems to be growing every day. GraphQL and the work done by Apollo Federation has made this concept accessible to a wider audience.

I just needed to get these thoughts out of my head, not sure where they will go but it's nice writing something down. Get in touch if you have anything to add to this.