[fpc-pascal] Read JSON from file
inquiry at greensnakedesign.com
Fri Aug 7 09:40:57 CEST 2015
On 08/06/2015 07:01 PM, leledumbo wrote:
>> I download a file from a server that contains JSON code. I'm not sure how
> to read it into something that GetJSON is able to handle.
> Can't you figure out from the function interface:
Dentist.pas(56,18) Error: Incompatible type for arg no. 1: Got
"TStringList", expected "TStream"
This is what I get when I use:
function ReadJSON (jsonfile, node:string) : string;
J:=GetJSON(json); // Error is here.
ReadJSON := J.FindPath(node).AsString;
Does this mean my Lazarus / FPC is out of date? Or I'm using the wrong
library or something?
More information about the fpc-pascal