LOGBOOK

HELP

Quiz Entry - updated: 2026.06.23

What is a data-exchange format, and why does a webservice need one?

A data-exchange format is an agreed text structure (like JSON or XML) for encoding data so two systems can send and reliably parse it — it's the common language a webservice and its caller share.

A webservice has to ship data over the network as plain text. Without an agreed structure, the receiver would just get a blob of characters with no way to know where one field ends and the next begins. A data-exchange format fixes that by defining exact rules for laying out the data — names, nesting, how a number versus a string looks — so the sender can serialise its data into text and the receiver can parse that text straight back into program variables.

For example, asking the transport API for stations near "Basel" returns a clearly structured JSON document:

GET http://transport.opendata.ch/v1/locations?query=Basel
{ "stations": [ { "id": "000000022", "name": "Basel" } ] }

Because the shape is defined, the caller's code knows to read stations[0].name — that predictability is the entire value of the format. The two formats this deck focuses on are XML and JSON.

Tip: Think of it as the difference between handing someone a labelled form versus a handwritten note — the form (the format) is what makes the data machine-readable.

From Quiz: WEBT / External Webservices | Updated: Jun 23, 2026