![]() |
String -> JSON Encoding mit Delphi-Eigenen Mitteln
Ich will mit Delphi XE5 einen String in das JSON Format konvertieren, allerdings ohne externe Komponenten.
Das geht problemlos mit einem Objekt:
Delphi-Quellcode:
Wie schaffe ich es mit einem String als Ausgangsbasis?
uses REST.Json;
... var myObject: TDataObject; var s: string; ... myObject.Text := 'äö%&/'; myObject.Number := 2; s := TJson.ObjectToJsonString(myObject); |
AW: String -> JSON Encoding mit Delphi-Eigenen Mitteln
Ich versteh die Frage nicht?
Was repräsentiert der String? |
AW: String -> JSON Encoding mit Delphi-Eigenen Mitteln
Ich will sowas in der Art:
Delphi-Quellcode:
s, t: string;
... t := 'äö%&/'; s := TJson.StringToJsonString(t); // s = "\u00e4\u00f6%&\/" |
AW: String -> JSON Encoding mit Delphi-Eigenen Mitteln
Ah. Unicode.
Da wäre das Stichwort Encoding. |
AW: String -> JSON Encoding mit Delphi-Eigenen Mitteln
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:39 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