Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from leledumbo/master
Add Free Pascal fcl-json to parser list
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{$mode objfpc} | ||
uses | ||
Classes,SysUtils,fpjson,jsonparser; | ||
var | ||
Input: TStringList; | ||
JSON: TJSONData; | ||
begin | ||
try | ||
try | ||
Input := TStringList.Create; | ||
Input.LoadFromFile(ParamStr(1)); | ||
JSON := GetJSON(Input.Text); | ||
finally | ||
JSON.Free; | ||
Input.Free; | ||
end; | ||
except | ||
on e: EParserError do begin | ||
ExitCode := 1; | ||
end; | ||
on e: Exception do begin | ||
ExitCode := 2; | ||
end; | ||
end; | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters