0

Trying to use JSON_ANNOTATION but the json contains an array or arrays. Not sure how to convert path to Paths object that has multiple path objects.

Something like this maybe, but this isn't two levels deep?

{
  "paths":"$[]path"
}

JSON:

  "path": [

    [

      -97.76488387025893,
      30.39184803608805
    ],
    [

      -99.76488387025893,
      31.39184803608805
    ],
   .....
  ],

1 Answer 1

1

You can easily convert your json data to dart class with converters.

There are some tools on the web for that :

After, you just have to call the fromJson() method of the generated class to get your datas on it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.