Hey, I got this JSON file from someone, but I couldn’t find a solution with a JSON file formatted like this one that explains how I can put my JSON values into float arrays.
The JSON contains values for time, x, y, x-velocity, y-velocity
[
[
0.0,
-0.0,
1.0,
0.0,
5.0,
0.0
],
[
0.01,
0.00075,
0.99999831334375,
-0.25763589812764937,
4.999949451675574,
-0.022482897703140683
],
[
0.02,
0.0019999873629188937,
0.9999880161513413,
-0.6861371272100371,
4.999641481646385,
-0.05987532881528388
],
[
0.03,
0.003749861881495129,
0.9999579210647058,
-1.2840585639027504,
4.998744414678499,
-0.11204586882393658
],
[
0.04,
0.005999296868100454,
0.9998924571594066,
-2.049159211875057,
4.996802578753328,
-0.1787847559611664
],
[
0.05,
0.008747538286414783,
0.9997717804350016,
-2.978191605321729,
4.993246914800202,
-0.259779229035477
],
[
0.06,
0.011993148781034916,
0.9995719432308737,
-4.066651219867101,
4.987411143879327,
-0.35458437910927293
],
[
0.07,
0.01573370713894441,
0.9992651411229377,
-5.308506740020048,
4.978554864457109,
-0.46259211146586565
],
[
0.08,
0.019965478773732954,
0.9988200562639874,
-6.695939255501838,
4.965894579457251,
-0.583001737319105
],
[
0.09,
0.02468307862421734,
0.998202313435944,
-8.219125122248375,
4.948642833751612,
-0.7147965472488054
],
[
0.1,
0.029879153599656535,
0.9973750585951063,
-9.866101428531966,
4.926054370787294,
-0.8567311924094966
]
]
I’m really not sure but can I use this as is or do I need to make changes/reformat the JSON file?
Haven’t worked with JSON files yet, just thought it would be a good solution for what I wanted to do.
Thanks in advance!