Skip to content

Error loading the Json file if it does not exist. #28

@dalfy15

Description

@dalfy15

If we upload a non-existing Json file, an error appears.
Maybe add a file existence check and if it doesn't exist, then create an empty object?
LoadFromFile:
if SysUtils.FileExists( FileName ) then
begin
F := TFileStream.Create( FileName, fmOpenRead );
...
end
else
FJson.AsObject;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions