[DZone Research] API Management: RESTful APIs and Data Exchange Formats
In this article, we look at how developers make use of RESTful APIs and the industry trends surrounding JSON, XML, and YAML.
Join the DZone community and get the full member experience.
Join For FreeThis article is part of the Key Research Findings from the DZone Guide to API Management: Comparative Views of Real-World Design.
Introduction
For this year's API Management Guide Survey, we received 1,287 responses with a 55% completion rate. Based on these responses, we've compiled a quick article on the use of RESTful APIs and the industry trends surrounding JSON, XML, and YAML.
RESTful APIs
Representational State Transfer, or REST, has become an extremely popular architecture with which to develop APIs. Among survey respondents, 52% use REST as much as possible, and 33% use REST whenever possible, with a few exceptions, when building and designing APIs. Only 3% told us they completely avoid the REST architectural style. Comparing these numbers to our 2017 Integration Survey, a startling trend appears. In last year’s survey, 68% of respondents reported using REST whenever possible, 6% told us they use REST whenever possible, with a few exceptions, and 20% said they had no REST policy or preference. Thus, among respondents, it appears that the trend in the RESTful API space is to move more towards a model of using RESTful APIs for most, but not all, situations.
Even with the trend towards a more moderate use of RESTful APIs, a majority of respondents still build and use RESTful APIs. When we asked, “How do you version your REST APIs?”, we saw a rather even split among several different answer choices. The following responses proved the most popular:
31% said they version in the endpoint URI without aliases.
25% version in the endpoint URI with backward compatible aliases.
23% do no perform explicit versioning.
21% use an API gateway with routing.
20% use versioning in the codebase.
Data Exchange Formats
No matter the ways in which respondents choose to version their APIs over time, there’s consistently only one form of supplying an API with data that are widely popular. In this year’s survey, 93% of respondents reported using JSON as their data serialization and interchange format. We saw the same massive majority of JSON users in last year's survey, with 97% of respondents to the 2017 Integration Survey reporting to use JSON for data serialization and interchange. Unlike JSON, the popularity of the other two important forms of data transfer, XML and YAML, has been in constant flux. In 2017, 93% of respondents used XML; this year, only 61% reported using XML. What’s more, in our three previous Integration Guides, we’d seen a steady growth among YAML users, going from 34% in 2015 to 39% in 2016 to 46% in 2017. But, this year, much like with XML, we saw a startling and precipitous drop, with only 23% of respondents claiming to use YAML for data serialization and interchange.
Conclusion
The reasons for this significant drop in XML users could lie in the increasing popularity of RESTful APIs noted above. According to the article, “Choosing JSON Over XML”: “RESTful APIs depend on easy, reliable, and fast data exchanges. JSON fits the bill for each of these attributes, while XML is struggling to keep up.” The decline in YAML, however, cannot be explained in these terms. YAML itself is a superset of JSON, and thus reads and performs very similarly to its highly popular cousin. Some factors in this year’s decline in YAML adoption among our survey respondents could be that the parsers necessary for applications to read YAML files have not yet been built into many languages and because YAML is whitespace dependent, meaning it can be harder for developers to troubleshoot and debug than JSON.
This article is part of the Key Research Findings from the DZone Guide to API Management: Comparative Views of Real-World Design.
Opinions expressed by DZone contributors are their own.
Comments