boolean are now serialized as 'true' or 'false'
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@501 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
3a3ac174b1
commit
b48c112f91
@ -357,10 +357,21 @@ type
|
||||
{$M-}
|
||||
|
||||
|
||||
function BoolToSoapBool(const AValue : Boolean) : string;{$IFDEF USE_INLINE}inline;{$ENDIF}
|
||||
|
||||
implementation
|
||||
Uses {$IFDEF WST_DELPHI}XMLDoc,XMLIntf,{$ELSE}XMLWrite, XMLRead,wst_fpc_xml,{$ENDIF}
|
||||
StrUtils, imp_utils;
|
||||
|
||||
|
||||
function BoolToSoapBool(const AValue : Boolean) : string;
|
||||
begin
|
||||
if AValue then
|
||||
Result := 'true'
|
||||
else
|
||||
Result := 'false';
|
||||
end;
|
||||
|
||||
{ TStackItem }
|
||||
|
||||
function TStackItem.GetItemsCount: Integer;
|
||||
@ -741,7 +752,7 @@ function TSOAPBaseFormatter.PutBool(
|
||||
const AData : Boolean
|
||||
): TDOMNode;
|
||||
begin
|
||||
Result := InternalPutData(AName,ATypeInfo,LowerCase(BoolToStr(AData)));
|
||||
Result := InternalPutData(AName,ATypeInfo,BoolToSoapBool(AData));
|
||||
end;
|
||||
|
||||
function TSOAPBaseFormatter.PutInt64(
|
||||
@ -1519,7 +1530,7 @@ begin
|
||||
tkBool :
|
||||
begin
|
||||
boolData := Boolean(AData);
|
||||
dataBuffer := BoolToStr(boolData);
|
||||
dataBuffer := BoolToSoapBool(boolData);
|
||||
end;
|
||||
{$ENDIF}
|
||||
tkInteger :
|
||||
|
@ -1085,7 +1085,7 @@ begin
|
||||
f.EndScope();
|
||||
|
||||
s := TMemoryStream.Create();
|
||||
f.SaveToStream(s);
|
||||
f.SaveToStream(s); s.SaveToFile(ClassName + '.Test_Bool.xml');
|
||||
intVal_1 := False;
|
||||
intVal_3 := True;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user