Count observations in an IMF SDMX-JSON data payload.
The IMF API can return observations either directly on a dataset or nested
under data.dataSets[].series[*].observations. The Stage-A probe uses this
parser to distinguish a reachable endpoint from an empty WEO slice without
interpreting the economic values themselves.
Parameters
payload: unknown
Raw JSON string or already-parsed SDMX-JSON payload.
Returns number
Number of observation cells found; 0 for invalid or empty input.
Count observations in an IMF SDMX-JSON data payload.
The IMF API can return observations either directly on a dataset or nested under
data.dataSets[].series[*].observations. The Stage-A probe uses this parser to distinguish a reachable endpoint from an empty WEO slice without interpreting the economic values themselves.