Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++

RAD Server Academy Course – lecture 7 extract – Returning JSON using JSONValue and JSONWriter.

I’ve uploaded an extract of me RAD Server Embarcadero Academy course Lecture 7 – Returning JSON using JSONValue and JSONWriter. This video clips will give you an example of one of the lectures that are included in the Delphi and C++ courses.

The clips (on my YouTube channel) show you how to use JSONWriter to output rows and columns of database data as JSON data.

There are clips for Delphi and C++Builder:

Delphi Source Code:

Fullscreen

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
interface
uses
System.SysUtils, System.Classes, System.JSON,
EMS.Services, EMS.ResourceAPI, EMS.ResourceTypes, FireDAC.Stan.Intf,
FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf,
FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys,
FireDAC.Phys.IB, FireDAC.Phys.IBDef, FireDAC.ConsoleUI.Wait,
FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt,
FireDAC.Stan.StorageJSON, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client,
FireDAC.Comp.BatchMove.JSON, FireDAC.Comp.BatchMove,
FireDAC.Comp.BatchMove.DataSet;
type
[ResourceName(‘FireDAC’)]
TFireDACResource1 = class(TDataModule)
DatabaseConnection: TFDConnection;
EmployeeQuery: TFDQuery;
FDStanStorageJSONLink1: TFDStanStorageJSONLink;
EmployeeQueryEMP_NO: TSmallintField;
EmployeeQueryFIRST_NAME: TStringField;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

C++ Source Code:

Fullscreen

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//—————————————————————————
#pragma hdrstop
#include “DMUnit.h”
#include <memory>
//—————————————————————————
#pragma package(smart_init)
#pragma classgroup “System.Classes.TPersistent”
#pragma resource “*.dfm”
//—————————————————————————
__fastcall TFireDACResource1::TFireDACResource1(TComponent* Owner)
: TDataModule(Owner)
{
}
void TFireDACResource1::Get(TEndpointContext* Acontext,
TEndpointRequest* Arequest, TEndpointResponse* AResponse)
{
EmployeeQuery->Close();
EmployeeQuery->SQL->Clear();
EmployeeQuery->SQL->Add(“select * from employee”);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Watching the Academy lecture videos, reading the lecture course notes and working with the example code you’ll learn the following:

  • RAD Server’s application development tips and techniques
  • RAD Server’s platform requirements
  • How to build and test your first RAD Server applications
  • How to deploy your RAD Server applications to Windows+IIS and Linux+Apache
  • The new RAD Server features in RAD Studio 10.3 Rio releases
  • How to build client applications using RAD Studio and Sencha EXT JS to access your RAD Server endpoints
  • What sample projects and application templates are available for RAD Server to help get you started
  • Where to find additional references, resources, videos, blog posts and more

Courses:

Using Delphi and RAD Server to Rapidly Design, Build, Debug, and Deploy Services-Based Solutions
https://www.embarcaderoacademy.com/p/delphi-and-rad-server

Using C++Builder and RAD Server to Rapidly Design, Build, Debug, and Deploy Services-Based Solutions
https://www.embarcaderoacademy.com/p/cpp-and-rad-server


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Related posts
CodeDelphi

Robust DataSet To JSON And JSON To DataSet API For Delphi

DelphiShowcase

PAT: An Incredible Process Analysis Tool Made In Delphi

C++DatabaseDelphi

High-Performance Visual And Non-visual Custom DataBase Grid Components Are Great For Windows Apps

C++Showcase

Relyze Desktop: Impressive Reverse Engineering Software Suite Is Built In C++Builder

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES