hardStudy question · answer published in REST API interview questions, so no pointsjavascriptapi-design
Large IDs change in the browser
The database uses BIGINT ids, and the API serializes them as JSON numbers. What does the client print here?
const body = '{"id": 9007199254740993}'
console.log(JSON.parse(body).id)Discussion 0
Join free to post in the discussion.
Related questions
- Status code after creating a resourceFull Stack Developer
- Which method is idempotentFull Stack Developer
- fetch and error status codesFull Stack Developer
- PATCH vs PUT for one fieldFull Stack Developer
- Timer vs promise orderFull Stack Developer
- Posts vanish from GET linksFull Stack Developer
- URL for a user’s ordersFull Stack Developer
- try/catch around an async callFull Stack Developer