Replaces the value of a specified property from a JSON object. If the property does not exist in the JSON object, a new property with the specified name and value will be created. If the property does not contain a float value, nothing happens.
Json.bdh
JsonSetFloatProperty( in handle : number,
in property : string,
in value : float ): boolean;
| Parameter | Description |
|---|---|
| handle | Valid handle to a JSON object |
| property | Name of the property in the JSON object (case sensitive) |
| value | The new value of the property |
transaction TMain
var
jsonText : string;
jsonObject : number;
newValue : float;
begin
WebParseDataBound(jsonText);
WebPageUrl("http://mycompany.com/api/jsondata");
jsonObject := JsonParse(jsonText);
newValue := 11.22;
JsonSetFloatProperty(jsonObject, "FloatPropertyName", newValue);
JsonFree(jsonObject);
end TMain;