Sending JSON Responses
メニューを表示するにはスワイプしてください
In backend development, data is usually sent in JSON format.
JSON is a structured way to represent data. It looks like a JavaScript object but is used for communication between systems.
In Express, you can send JSON using res.json():
app.get('/user', (req, res) => {
res.json({
name: 'John',
age: 25
});
});
This sends a structured response that can be easily used by the frontend.
JSON is commonly used because it is simple, readable, and supported by all modern applications.
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 6
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 1. 章 6