JSON carries structured application data between files, web servers, and clients. A Rust server can load order records from orders.json and return them through an API response with an application/json content type. section 2.3.5
A Rust web application can retrieve JSON from a REST endpoint and deserialize the payload into a strongly typed Vec<Tutor> using serde_json and a matching Rust struct. section 7.7
Orders served through an API
The orders.json file contains an array of objects with order_id, order_date, and order_status fields. The server exposes these records at /api/shipping/orders, while a browser or curl client verifies the response. section 2.3.5
Tutor-list deserialization
The Actix Web handler requests http://localhost:3000/tutors/, reads the response body, converts it with serde_json, and passes the resulting tutors to a Tera template. section 7.7
Listing 2.30 The JSON data file for orders (httpserver/data/orders.json)
[
{
"order_id": 1,
"order_date": "21 Jan 2020",
"order_status": "Delivered"
},
{
"order_id": 2,
"order_date": "2 Feb 2020",
"order_status": "Pending"
}
]
Inspect the concrete orders.json artifact used as the server's JSON data source. section 2.3.5


































