Extract as list (supports both List and Array variants)
(&self)
| 243 | |
| 244 | /// Extract as list (supports both List and Array variants) |
| 245 | pub fn as_list(&self) -> Option<&Vec<Value>> { |
| 246 | match self { |
| 247 | Value::List(list) => Some(list), |
| 248 | Value::Array(arr) => Some(arr), // Backward compatibility |
| 249 | _ => None, |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | /// Extract as integer if possible (from number) |
| 254 | pub fn as_integer(&self) -> Option<i64> { |