Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб API Formats: Why JSON won over XML в хорошем качестве

API Formats: Why JSON won over XML 3 года назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



API Formats: Why JSON won over XML

Why did JSON replace XML as the preferred representation format for APIs? There are many reasons one can speculate about, and there probably is no way to isolate one single reason, or to even find the main reason. But it is possible to have opinions about this, and in this video I explain one of the factors that in my experience contributed greatly to JSON being preferred over XML. Other factors of course played a role as well, such as XML's verbosity and the rather complex ecosystem of related specifications. But one main factor was that XML at its heart is a document format. It is great for representing documents, and it can represent data, but that's not its strong suit. Being a document-focused format, it represents everything as trees, which then have to be traversed in order to process information from those documents. That results in extra work and a cognitive dissonance between the data that is being represented in APIs (in XML's document-centric format) and the way how most applications internally represent data (oftentimes in structured object models). JSON came along and changed that by simply reusing the object model of an existing language (JavaScript, as JSON simply stands for JavaScript Object Notation). That was a much better fit for most APIs (which often are using structured data and not documents) and developers (who often work in languages that have object models close to JSON). This meant no more parsing and traversing of XML trees, instead the JSON objects could be relatively directly mapped into native data structures. You're more than welcome to disagree (please comment if you do!), and this is of course an opinionated and slightly exaggerated view. But it is one of the factors that are often overlooked, so giving it a bit more visibility seemed appropriate.

Comments