After a very productive time with ChatGPT, I tried to work with json.
It talks me into complete nonsense since days. Nothing works.
What I want looks quite easy to me.
Never the less I never did it before.
I grabbed a json file, which looks really nice, if I double-click it and view it in notepad ++
I attach it.
And I have an array TKurse, which "looks the same":
Type TEineKontraktZeile = packed Record
Datum: TDateTime;
open, high, low, close, Volume: double;
end;
Type TKurse = array of TEineKontraktzeile;
So, it shall be easy to take the data from one and fill it in the other?
However it does not work and does not work.
As I worked never before with json, it starts with the basic question, if I have to transform it.
ChatGPT said, I shall make it a string. I did by TstingList and stringList.saveAs made it a file.
So there is the option to work with the json file or the saved stringList of it.
Please hint me!
The next riddle are the meta-data. Sure, we all can read and understand them.
Is there a way that the computer reads them and know, what to do?
What I need is a basic demo, how json works.
ChatGPT made a lot of suggestions for source code and I ended up with compiler warnings "unknown..." something.
So the basic demo shall hint me as well, what to write best into the uses clauses and may be a class or unit to work with best.
thanks