Search in sources :

Example 46 with JSONString

use of com.google.gwt.json.client.JSONString in project rstudio by rstudio.

the class RemoteServer method getOutputPreview.

public void getOutputPreview(String dataFilePath, String encoding, boolean heading, String separator, String decimal, String quote, String comment, ServerRequestCallback<DataPreviewResult> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(dataFilePath));
    params.set(1, new JSONString(encoding));
    params.set(2, JSONBoolean.getInstance(heading));
    params.set(3, new JSONString(separator));
    params.set(4, new JSONString(decimal));
    params.set(5, new JSONString(quote));
    params.set(6, new JSONString(comment));
    sendRequest(RPC_SCOPE, GET_OUTPUT_PREVIEW, params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Example 47 with JSONString

use of com.google.gwt.json.client.JSONString in project rstudio by rstudio.

the class RemoteServer method replayNotebookChunkPlots.

@Override
public void replayNotebookChunkPlots(String docId, String chunkId, int pixelWidth, int pixelHeight, ServerRequestCallback<String> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(docId));
    params.set(1, new JSONString(chunkId));
    params.set(2, new JSONNumber(pixelWidth));
    params.set(3, new JSONNumber(pixelHeight));
    sendRequest(RPC_SCOPE, "replay_notebook_chunk_plots", params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONNumber(com.google.gwt.json.client.JSONNumber) JSONString(com.google.gwt.json.client.JSONString)

Example 48 with JSONString

use of com.google.gwt.json.client.JSONString in project rstudio by rstudio.

the class RemoteServer method connectionPreviewTable.

@Override
public void connectionPreviewTable(ConnectionId connectionId, String table, ServerRequestCallback<Void> callback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONObject(connectionId));
    params.set(1, new JSONString(table));
    sendRequest(RPC_SCOPE, CONNECTION_PREVIEW_TABLE, params, callback);
}
Also used : JSONObject(com.google.gwt.json.client.JSONObject) JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Example 49 with JSONString

use of com.google.gwt.json.client.JSONString in project rstudio by rstudio.

the class RemoteServer method renameFile.

public void renameFile(FileSystemItem file, FileSystemItem targetFile, ServerRequestCallback<Void> requestCallback) {
    JSONArray paramArray = new JSONArray();
    paramArray.set(0, new JSONString(file.getPath()));
    paramArray.set(1, new JSONString(targetFile.getPath()));
    sendRequest(RPC_SCOPE, RENAME_FILE, paramArray, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Example 50 with JSONString

use of com.google.gwt.json.client.JSONString in project rstudio by rstudio.

the class RemoteServer method readJSON.

public void readJSON(String path, boolean logErrorIfNotFound, ServerRequestCallback<JavaScriptObject> requestCallback) {
    JSONArray params = new JSONArray();
    params.set(0, new JSONString(path));
    params.set(1, JSONBoolean.getInstance(logErrorIfNotFound));
    sendRequest(RPC_SCOPE, "read_json", params, requestCallback);
}
Also used : JSONArray(com.google.gwt.json.client.JSONArray) JSONString(com.google.gwt.json.client.JSONString)

Aggregations

JSONString (com.google.gwt.json.client.JSONString)277 JSONArray (com.google.gwt.json.client.JSONArray)189 JSONObject (com.google.gwt.json.client.JSONObject)110 JSONNumber (com.google.gwt.json.client.JSONNumber)85 JSONValue (com.google.gwt.json.client.JSONValue)13 HashMap (java.util.HashMap)12 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)10 Map (java.util.Map)10 JsonCallbackEvents (cz.metacentrum.perun.webgui.json.JsonCallbackEvents)9 PerunError (cz.metacentrum.perun.webgui.model.PerunError)9 Material (org.cesiumjs.cs.scene.Material)9 MaterialOptions (org.cesiumjs.cs.scene.options.MaterialOptions)9 JsonPostClient (cz.metacentrum.perun.webgui.json.JsonPostClient)8 MetaData (com.ait.tooling.nativetools.client.collection.MetaData)7 ArrayList (java.util.ArrayList)7 JsArrayString (com.google.gwt.core.client.JsArrayString)6 RequestBuilder (com.google.gwt.http.client.RequestBuilder)6 Breakpoint (org.rstudio.studio.client.common.debugging.model.Breakpoint)6 Point (org.rstudio.studio.client.workbench.views.plots.model.Point)6 Request (com.google.gwt.http.client.Request)5