Scene Graph Validator — Tree-Shaped JSON Validation Framework

Asked at Amazon · Coding Questions · Difficulty: Medium · Last asked Jun 20, 2026

A robotics simulator loads its scenes from JSON. Before it runs a scene it must check the file and tell the author about every mistake at once, each with the exact place it occurs, for example `root.children[0].elements[1].features[0].parameters.degrees`. You will write that validator. It walks a tree of nodes, elements and features, applies the rules below, and returns the list of errors; an empty list means the scene is valid.

Loading the problem…