Website Is Under Maintenance

Let's Explore Some Knowledge

How Can the Same API Return Different JSON Responses? 🤔
📩 API Request:
GET /product-details/123
🛒 ProductDTO Fields:
id, name, price, stock, supplierInfo
Customer API Response:
{
    "id": 123,
    "name": "Laptop",
    "price": 1200
}
Admin API Response:
{
    "id": 123,
    "name": "Laptop",
    "price": 1200,
    "stock": 50,
    "supplierInfo": "ABC Ltd"
}
Hint: It's a simple annotation in Java! 😉