GithubHelp home page GithubHelp logo

eduardomrj / delphi-jsontodelphiclass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pkgeorgiev/delphi-jsontodelphiclass

0.0 1.0 0.0 204 KB

Generates Delphi Classes based on JSON string (Json To Delphi Class Generator / JSON Data Binding Tool)

License: MIT License

Pascal 100.00%

delphi-jsontodelphiclass's Introduction

Delphi-JsonToDelphiClass

Generates Delphi Classes based on JSON string. Just like XML Data Binding, but for JSON.

Main features:

  • Build entirely on the RTL (no external dependencies) so it's cross-platform;
  • Accepts any valid JSON string, no matter how complex the object is;
  • Visualizes the structure of the JSON objects in a treeview;
  • Generates complete delphi unit (declaration and implementation), based on the JSON string input;
  • Automatically prefixes reserved Delphi words with "&" (ampersand);
    • Blocks unit generation if the JSON string contains empty Array;
  • Adds support code to automatically destroy complex sub types. So you don't have to manage subobject's lifetime manually;
  • ** Uses TArray to represent lists;
  • Adds helper serialization/deserialization functions;
  • Serialization and deserialization results in the same JSON structure!
  • Automatically detects date/datetime parts and maps them to TDate/TDateTime (as long as dates are ISO8601 compliant);
  • Maps all numbers to Double;
  • Maps true/false values to Boolean;
  • Allows you to change property names (keys);
  • Allows you to change the names of the stub classes;
  • Supports JSON pretty print to format the input string;
  • Simple and responsive GUI;
  • *** Automatic check for update, based on ITask (Parallel Programming Library)!
  • It's open source! You can find the source code and binary releases on GitHub.
  • The program uses MadExcept to report unhanded exceptions;
  • If the JSON array is empty the contained type is unknown. Unit generation works only with known and supported types.

** This is because serialization of TList adds "noise" i.e. includes internal properties that did not exist in the original JSON string.

*** The releases of JsonToDelphiClass (source and binaries) are public and reside on GitHub. The update unit uses GitHub's REST API to enumerate tags/releases.

Report any problems/suggestions using GitHub's facilities.

You can find more information here: http://www.pgeorgiev.com/?p=1832

delphi-jsontodelphiclass's People

Contributors

pkgeorgiev avatar

Watchers

Eduardo  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.