編集

次の方法で共有


Query.SaveAsJson(Integer, OutStream) Method

Version: Available or changed with runtime version 14.0.

Saves the resulting data set of a query as an .json file.

Syntax

[Ok := ]  Query.SaveAsJson(Number: Integer, OutStream: OutStream)

Parameters

Number
 Type: Integer
The ID of the query object that you want to save as an .json file. If the query that you specify does not exist, then a run-time error occurs.

OutStream
 Type: OutStream
The stream that you want to save the query as Json to.

Return Value

[Optional] Ok
 Type: Boolean
true if the SaveAsJson succeeded, otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.

Example

procedure Test();
var
    result : Boolean;
    os: OutStream;
begin
    result := Query.SaveAsJson(10, os);
end;

Query Data Type
Getting Started with AL
Developing Extensions