Skip to content

Parsing json array of arrays #138

Description

@jepessen

I made a request, and the reply body is

[[1618160400,0.0000958,0.0000983,0.000096,0.0000976,14170.94],[1618156800,0.0000956,0.000098,0.0000956,0.0000959,12175.8],[1618153200,0.0000948,0.0000964,0.0000953,0.0000956,2815.79],[1618149600,0.0000948,0.0000957,0.0000948,0.0000951,1451.8],[1618146000,0.0000943,0.0000953,0.0000951,0.0000947,2114.07],[1618142400,0.0000934,0.0000954,0.0000942,0.0000954,3783.13]]

It's a JSON array, and every array element is an array itself, where the first value is an integer, and other five values are doubles. How can I parse it using the IteratorFromJsonSerializer in a struct like

struct MyData {
  int v1;
  double v2;
  double v3;
  double v4; 
  double v5;
  double v6;
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions