Re: [fpc-pascal] Read JSON from file

2015-08-07 Thread leledumbo
> J:=GetJSON(json);// Error is here. quick fix: J:=GetJSON(json.text); -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Read-JSON-from-file-tp5722198p574.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___

Re: [fpc-pascal] Read JSON from file

2015-08-07 Thread Felipe Monteiro de Carvalho
On Fri, Aug 7, 2015 at 8:33 AM, Michael Van Canneyt wrote: > As it happens, I have yesterday committed an extension which allows you to > specify that the JSON supports comments. > Both // and /* */ are detected and discarded. Great! =) -- Felipe Monteiro de Carvalho ___

Re: [fpc-pascal] Read JSON from file

2015-08-07 Thread Chris Moody
On 08/07/2015 12:46 AM, Michael Van Canneyt wrote: On Fri, 7 Aug 2015, Chris Moody wrote: 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

Re: [fpc-pascal] Read JSON from file

2015-08-07 Thread Michael Van Canneyt
On Fri, 7 Aug 2015, Chris Moody wrote: 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: http://www.freepascal.org/doc

Re: [fpc-pascal] Read JSON from file

2015-08-07 Thread Chris Moody
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: http://www.freepascal.org/docs-html/fcl/fpjson/getjson.html Dentist.pa

Re: [fpc-pascal] Read JSON from file

2015-08-06 Thread Michael Van Canneyt
On Fri, 7 Aug 2015, Michael Van Canneyt wrote: On Fri, 7 Aug 2015, Felipe Monteiro de Carvalho wrote: On Thu, Aug 6, 2015 at 10:37 PM, Chris Moody wrote: For my current project, I download a file from a server that contains JSON code. I'm not sure how to read it into something that GetJS

Re: [fpc-pascal] Read JSON from file

2015-08-06 Thread Michael Van Canneyt
On Fri, 7 Aug 2015, Felipe Monteiro de Carvalho wrote: On Thu, Aug 6, 2015 at 10:37 PM, Chris Moody wrote: For my current project, 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. My first thought was using T

Re: [fpc-pascal] Read JSON from file

2015-08-06 Thread Michael Van Canneyt
On Thu, 6 Aug 2015, Chris Moody wrote: Hi all, For my current project, 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. My first thought was using TStrings, however not sure how to convert a TString into T

Re: [fpc-pascal] Read JSON from file

2015-08-06 Thread Felipe Monteiro de Carvalho
On Thu, Aug 6, 2015 at 10:37 PM, Chris Moody wrote: > For my current project, 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. > > My first thought was using TStrings, however not sure how to convert a > TString

Re: [fpc-pascal] Read JSON from file

2015-08-06 Thread leledumbo
> 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: http://www.freepascal.org/docs-html/fcl/fpjson/getjson.html -- View this message in context: http://free-pasc

[fpc-pascal] Read JSON from file

2015-08-06 Thread Chris Moody
Hi all, For my current project, 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. My first thought was using TStrings, however not sure how to convert a TString into TStream. Any assistance would be much appr