pub fn json_to_scope_map( value: &Value, ) -> Result<Vec<(String, Vec<String>)>, String>
Driver JSON object → scope map, preserving key order.