* Allow Boolean -> TValue

This commit is contained in:
Michaël Van Canneyt 2024-12-03 23:38:20 +01:00
parent 5887b1fee3
commit eb08fd88f2

View File

@ -1619,7 +1619,13 @@ end;
function TJSONBool.AsTValue(aTypeInfo: PTypeInfo; var aValue: TValue): Boolean;
begin
Result:=inherited AsTValue(aTypeInfo, aValue);
if aTypeInfo^.Kind=tkBool then
begin
TValue.Make(@FValue,aTypeInfo,aValue);
Result:=True;
end
else
Result:=inherited AsTValue(aTypeInfo, aValue);
end;
constructor TJSONBool.Create(aValue: Boolean);