π What's New in v1.0.0
Initial stable release of EasyJson β a fluent and lightweight Delphi library for working with JSON objects more intuitively.
π Features
β
Fluent interface for JSON creation and manipulation
β
Chainable method calls (e.g., .Add()
, .Put()
, .Get()
)
β
Support for nested JSON objects and arrays
β
Automatic type detection for basic types
β
Easily serialize and deserialize JSON with built-in helpers
β
No external dependencies β pure Delphi
π¦ Installation
Just drop EasyJson.pas
into your Delphi project and add it to your uses
clause.
π Example Usage
var
LJson: TEasyJson;
begin
// Create an instance of TEasyJson
LJson := TEasyJson.Create();
try
// Populate the JSON object with values using Put()
LJson.Put('name', 'EasyJson')
.Put('version', LJson.GetVersion())
.AddArray('features')
.Put(0, 'fluent')
.Put(1, 'lightweight')
.Put(2, 'delphi');
// Print the formatted JSON structure
Writeln(LJson.Format());
finally
// Free the JSON object to prevent memory leaks
LJson.Free;
end;
end;
π§© Compatibility
- Developed/Tested on Delphi 12 and newer
- No third-party libraries required