2011/12/18 ik <ido...@gmail.com>:
> Hello,
>
> I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser.
>
> I've written the following code:

Use:

var
  parser: TJSONParser;
  json_data: TJSONData;
  json_file: TFileStream;
begin
  json_file := TFileStream.Create('test.json', fmOpenRead);
  parser := TJSONParser.Create(json_file);
  json_data := parser.Parse;
  WriteLn(json_data.AsJSON);
  json_data.Free;
  json_file.Free;
  parser.Free;
end;

Thx.

-- 
Silvio Clécio
===============================================
Blog - <silvioprog.com.br>
Twitter - <twitter.com/silvioprog>
Facebook - <facebook.com/silvioclecio>
LazSolutions - <code.google.com/p/lazsolutions>
Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR>
===============================================
   * Conheça nosso canal IRC sobre Lazarus: #lazarus-br *
===============================================
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to