I have an API that calls the json String array as follows:
[
\"006.01.01\",
\"006.01.01 1090\",
\"006.01.01 1090 1090.950\",
\"006.01.01 1090 1090.95
We can easily parse the JSON into a Dart array without the need of creating any class.
main() {
String arrayText = '{"tags": ["dart", "flutter", "json"]}';
var tagsJson = jsonDecode(arrayText)['tags'];
List tags = tagsJson != null ? List.from(tagsJson) : null;
print(tags);
}
Now you can see the result of printing the Dart Array.
[dart, flutter, json]