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:
parent
9546f5bb9e
commit
41db3ae6da
@ -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 }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user