A Delphi and Lazarus (FPC) library for bidirectional conversion between JSON and DataSets, including validation and structure management.
DataSet Serialize is a library for Delphi and Lazarus (Free Pascal) that simplifies the serialization and deserialization of data between JSON and DataSets. It provides a comprehensive set of features to export DataSet records to JSON, import JSON data into DataSets, validate JSON against DataSet constraints, and manage DataSet field structures. This makes it particularly valuable for developers building RESTful APIs, data-driven applications, or any system requiring seamless data interchange between database layers and JSON formats.
Delphi and Lazarus (Free Pascal) developers building RESTful APIs, data-driven desktop applications, or systems that require JSON-based data interchange with database layers. It is especially useful for those working with FireDAC or similar database components and needing to handle master-detail relationships.
Developers choose DataSet Serialize because it integrates seamlessly via class helpers, requiring minimal setup, and offers practical, real-world functionality like JSON validation, structure management, and data merging. Its unique selling point is the comprehensive handling of DataSet operations—including nested JSON via master-detail, record state management for REST operations, and extensive customization options—all in a single, easy-to-use library.
JSON to DataSet and DataSet to JSON converter for Delphi and Lazarus (FPC)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses class helpers to add methods directly to TDataSet, enabling easy incorporation into existing Delphi/Lazarus projects without invasive code changes, as shown in the minimal setup examples.
Supports full DataSet to JSON conversion and vice versa, including nested JSON via master-detail relationships and handling record states (inserted, modified, deleted) for REST operations, detailed in the LoadFromJSON section.
Validates JSON against DataSet field constraints, returning detailed error messages for missing required fields, which is practical for API input validation, as demonstrated in the ValidateJSON examples.
Offers extensive customization options like date formats, case naming conventions, and export/import rules, allowing fine-tuned behavior for diverse use cases, listed in the Configurations section.
Only supports Win32 and Win64 platforms, excluding cross-platform development with Delphi's FireMonkey or Lazarus on other operating systems, as indicated by the badges in the README.
Advanced features like exporting only updated records require FireDAC with CachedUpdates enabled, limiting compatibility with other database components such as dbExpress or UniDAC, noted in the ToJSONObject parameters.
Validation is limited to checking if required fields are present; it doesn't support JSON schema validation, custom rules, or complex data types, which may be insufficient for sophisticated applications.