UNDERSTAND
Bring these concepts with you
BUILD
Your implementation
- Implement parseStructuredResponse(rawText, schema) safely stripping clean code fences.
- Validate parsed JSON objects against schema.fields (required, type, enum) and throw on extra unexpected keys.
export function parseStructuredResponse(rawText, schema) {
// Parse JSON strictly and verify required fields, types, enums, and allowed keys.
}Need a hint?
- Reject prose wrapped around JSON—only clean JSON or explicit fenced JSON should parse.
- Reject unknown properties so injected keys like role: 'admin' cannot slip downstream.
Saved on this device · 0 / 6000 · Do not include passwords or private data.
VERIFY
Acceptance checks
From the folder containing your downloaded files, run:
node checks.mjs ./starter.mjs 5This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.
Record your attempt to enable the checklist and reference comparison.
Compare with the reference
Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.
EXPLAIN
Your interviewer asks
What is the risk of silently defaulting to empty values when JSON parsing fails 5% of the time?
Say your answer aloud, then record the trade-offs and evidence in your notes above.
LOCAL VOICE REHEARSAL
Rehearse your step walkthrough aloud
00:00/ 02:00