mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 06:09:39 +02:00
* Allow comments in JSON config file
git-svn-id: trunk@31293 -
This commit is contained in:
parent
97bc0a4bff
commit
3acf0285aa
@ -28,7 +28,7 @@ unit jsonConf;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, fpjson, jsonparser;
|
SysUtils, Classes, fpjson, jsonscanner,jsonparser;
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
SWrongRootName = 'XML file has wrong root element name';
|
SWrongRootName = 'XML file has wrong root element name';
|
||||||
@ -596,7 +596,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
F:=TFileStream.Create(AFileName,fmopenRead);
|
F:=TFileStream.Create(AFileName,fmopenRead);
|
||||||
try
|
try
|
||||||
P:=TJSONParser.Create(F);
|
P:=TJSONParser.Create(F,[joUTF8,joComments]);
|
||||||
try
|
try
|
||||||
J:=P.Parse;
|
J:=P.Parse;
|
||||||
If (J is TJSONObject) then
|
If (J is TJSONObject) then
|
||||||
|
Loading…
Reference in New Issue
Block a user