Dear fellow developers and triallists
This week we are rolling out the new v2.3 of GS1 Resolver! Packed with new features, performance improvements and. ahem, "correction of undocumented features" 😉 the new version now sports this line-up:
- New JSON output format conforming to the IETF Linkset standard.
- The new extended format for Mongo documents that reduces the processing overhead of the resolving web server, thus improving performance.
- New HTTP 303 'See Other' return code enabling clients to get more general info about an entry if the specific lot or serial number is not present (part of the 'walking up the tree' functionality).
- New HTTP 410 'Gone Away' return code if entry is present in the database but its 'active' flag is set to false (as compared to HTTP 404 'Not Found' when no entry exists at all).
- Additions to the GS1 Digital Link Toolkit library by Mark Harrison.
- Various bug fixes and improvements to the applications thanks to developer and triallists feedback.
GS1 Resolver CE, and the triallists service at
https://resolver-dv1.gs1.org have already adopted these new features, and our plan is to roll these out to our stage environment on Wednesday 27 Jan 2021, and Production (
https://id.gs1.org) on Friday 29 January 2021.
So what about this new JSON LinkSet format?
--------------------------------------------------------------------------
The Internet Engineering Task Force (IETF) is the premier Internet standards body, developing open standards through open processes. They describe their new LinkSet standard like this:
"Resources on the Web often use typed Web Links, either embedded in resource representations, for example using the <link> element for HTML documents, or conveyed in the HTTP "Link" header for documents of any media type.
In some cases, however, providing links in this manner is impractical or impossible and delivering a set of links as a stand-alone document is preferable.
Therefore, this specification defines two document formats and associated media types to represent sets of links. It also defines the "linkset" relation type that supports the discovery of any resource that conveys a set of links as a stand-alone document."
For GS1 Resolver, we have fulfilled their preference of "delivering a set of links as a stand-alone document" by using their specification as a JSON document.
To see this new LinkSet JSON format right now, try this web address and see the example data that comes with GS1 Resolver Community Edition in this new format:
..which shows a rendered web page of data. 'View source' to see the JSON.
Alternatively if, like me, you like to test using the CURL command-line internet browser, try this:
Since we have asked 'only' for JSON, we will get the pure linkset JSON output.
Now compare that output to the SAME data in the "link:" header by adding the -I switch to curl so that you only see the header data:
Which do you think is easier to parse and navigate by a client application? The JSON? Yes, we think so too!
But what was wrong with the previous JSON? Well, it was fine but it didn't conform to any standard; we just made it up to help developers. The Digital Link Working Group saw how useful it was, so Phil Archer researched the best internet standard for it to adopt, and IETF linkset was a clear choice, it being closest to the link: header in terms of content.
So this is our new format for JSON output. Let us know what you think! If you have written clients with the previous version, no worries we can help you translate from 'old' to 'new' - just get in touch with your app information.
Best regards
Nick Lansley