Forum: Object-Pascal / Delphi-Language
Delphi
by Der schöne Günther,
16. Jul 2018
So ungefähr?
type
TJsonObjectHelper = class helper for System.JSON.TJSONObject
function FindPair(const PairName: String): TJSONPair;
end;
procedure p();
const
input = '{"key": 123.400}';
Forum: Object-Pascal / Delphi-Language
Delphi
by Der schöne Günther,
13. Jul 2018
Also bei mir kommt 1:1 raus was im Json steht. Delphi 10 Seattle.
procedure p();
const
input = '{"key":123.4}';
var
jsonObject: TJSONObject;
jsonNumber: TJSONNumber;
begin
jsonObject := TJsonObject.ParseJSONValue(input) as TJSONObject;
jsonNumber := jsonObject.Values as TJSONNumber;