Skip to main content

Practice ยท 3 of 3

Boundary Validation

Implement load_users(path) that reads a JSON file and VALIDATES: must be a list of dicts, each with string 'name' and int 'age' >= 0. Raise ValidationError listing the first problem found; return cleaned dicts otherwise.

Difficulty: intermediate

Back to lesson: Practice: Round-Trip Drills