This is Javascript, not JSON. (The `var state =` makes it Javascript.)