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

10.2 Tokyo TJsonSerializer and JSON.Converters

Author: h.mohri


 

First declare with Pascal to use the converter and generics.

This is because the use of generics in C++Builder. C++Builder used Win64.

Include each file.

This time I tried TJsonListConverter and TJsonStringDictionaryConverter.

TJsonListConverter converts TList<T> to JSON. TJsonStringDictionaryConverter converts TDictionary<String, T> to JSON.

placed two buttons on the TForm.

It outputs a json string of after-converted to TMemo.

Button1 is TList<String> to JSON Convert. Button2 is TDictionary<String, String>to JSON.


 

It will be like this when executed.

 

 

 

 

Kai 1.1 Now Available! Kai 1.1 Now Available! What's Coming in RAD Studio 13.2 Florence

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

Leave a Reply

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

IN THE ARTICLES