How to do it...

Let's look at the following steps:

  1. Create a new VCL application and drop in three TButton and a TMemo. Align all the buttons as a toolbar at the top of the form and the memo to all the remaining from client areas.
  1. From left to right, name the buttons btnGenerateJSON, btnModifyJSON, and btnParseJSON.
  2. We'll use static data as our data source. A simple matrix is enough for this recipe. Just after the start of the implementation section of the unit, write the following code:
type 
  TCarInfo = ( 
    Manufacturer = 1, 
    Name = 2, 
    Currency = 3, 
    Price = 4); 
 
var 
  Cars: array [1 .. 4] of  array [Manufacturer .. Price] of string = ( ('Ferrari','360 Modena','EUR', '250000'), ('Ford', 'Mustang', 'USD', '80000'), ('Lamborghini', 'Countach', ...

Get Delphi Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.