Fix Compilation with fpc-trunck

Take advantage of fcl-json "Clone" method

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1258 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa 2010-07-19 10:42:25 +00:00
parent 9546f5bb9e
commit 41db3ae6da

View File

@ -61,6 +61,16 @@ begin
GetFormatterRegistry().Register(s_json,s_json_ContentType,TSimpleItemFactory.Create(TJsonRpcFormatter) as IItemFactory);
end;
{$IFDEF HAS_JSON_CLONE}
function Clone(const AValue : TJSONData) : TJSONData; inline;
begin
if ( AValue = nil ) then
Result := nil
else
Result := AValue.Clone();
end;
{$ELSE HAS_JSON_CLONE}
function Clone(const AValue : TJSONData) : TJSONData;
var
locParser : TJSONParser;
@ -94,6 +104,7 @@ begin
Result := nil;
end;
end;
{$ENDIF HAS_JSON_CLONE}
{ TJsonRpcFormatter }