Skip to content

More robust parsing of responses #11

@joeroe

Description

@joeroe

The parsing functions (intchron_extract() and intchron_tabulate()) currently just extract specific elements from the listified JSON response based on what other functions needed. Specifically, they assume the important data is contained in a "records" array. But according to the schema (http://intchron.org/schema) and in implementing #5 and #6 I encountered other data structures.

Rather than continuing to pile kludges into intchron_extract(), we should have a generalised R representation of the response data. Probably with a dedicated S3 class as suggested by https://cran.r-project.org/web/packages/httr/vignettes/api-packages.html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions