![]() |
Delphi-Version: 10.2 Tokyo
Attribute bei ObjectToJsonstring
Also irgendwie ignoriert mir die Funktion ObjectToJsonString von TJson meine Attribute.
Folgende Klasse:
Delphi-Quellcode:
Ergibt
TTest = Class
private fCaption : string; fIdent : Integer; [JsonName('Nixda')] fInternal: String; public constructor Create; Destructor Destroy;override; published End;
Code:
Dabei sollte es eigentlich
{"caption":"Testcaption","ident":42,"internal":"Testcaption mit 42"}
Code:
sein.
{"caption":"Testcaption","ident":42,"Nixda":"Testcaption mit 42"}
Muss man da noch irgendwas beachten, wenn man so Objekte serialisieren will ? |
AW: Attribute bei ObjectToJsonstring
:wall::wall::wall::wall::wall::wall:
Rest.Json.Types nicht in der Uses........... |
AW: Attribute bei ObjectToJsonstring
Alternativ auf die Compiler-Warnungen schauen :P
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:59 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz