1
vote
Vote UpVote

How to convert a Delphi enum or set to a JSON value, with different specific values…

The Wiert Corner – As I will probably need this one day: [WayBack] How does one convert a Delphi enum to a JSON value, with different specific values? – CHUA Chee Wee – Google+: eg, TEnum1 = (test1, test2, test3) TSomeClass.FEnum := test1; When converted to JSON, I’d like to see maybe {"Enum": "Value1"} instead of test1 and test2 to "Godzilla", test3 to "Tiburon" The solution is in his repository: github/chuacw/EnumJson: solution: EnumJSON.Interceptors.pas example: EnumDemo.pas / CustomizedEnumJSON.dpr After initially suggesting to look into [Archive.is] Serializing User Objects – RAD ...
Favorite? Off-Topic? jpluimers @ 2019-11-07 06:04

Statistics

Visits: 175
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Michał Rajewicz
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)