org.sonar.api.web.gwt.client.webservices
Class JsonUtils

java.lang.Object
  extended by org.sonar.api.web.gwt.client.webservices.JsonUtils

public final class JsonUtils
extends Object


Nested Class Summary
static interface JsonUtils.JSONHandler
           
 
Method Summary
static void dispatchJSON(com.google.gwt.core.client.JavaScriptObject jsonObj, JsonUtils.JSONHandler handler)
           
static com.google.gwt.json.client.JSONObject getArray(com.google.gwt.json.client.JSONValue json, int i)
           
static int getArraySize(com.google.gwt.json.client.JSONValue array)
           
static Boolean getBoolean(com.google.gwt.json.client.JSONObject json, String field)
           
static Date getDate(com.google.gwt.json.client.JSONObject json, String field)
           
static Double getDouble(com.google.gwt.json.client.JSONObject json, String field)
           
static Integer getInteger(com.google.gwt.json.client.JSONObject json, String field)
           
static String getString(com.google.gwt.json.client.JSONObject json, String field)
           
static void makeJSONRequest(int requestId, String url, JsonUtils.JSONHandler handler)
           
static void requestJson(String url, JsonUtils.JSONHandler handler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

requestJson

public static void requestJson(String url,
                               JsonUtils.JSONHandler handler)

makeJSONRequest

public static void makeJSONRequest(int requestId,
                                   String url,
                                   JsonUtils.JSONHandler handler)

dispatchJSON

public static void dispatchJSON(com.google.gwt.core.client.JavaScriptObject jsonObj,
                                JsonUtils.JSONHandler handler)

getString

public static String getString(com.google.gwt.json.client.JSONObject json,
                               String field)

getDate

public static Date getDate(com.google.gwt.json.client.JSONObject json,
                           String field)

getBoolean

public static Boolean getBoolean(com.google.gwt.json.client.JSONObject json,
                                 String field)

getDouble

public static Double getDouble(com.google.gwt.json.client.JSONObject json,
                               String field)

getInteger

public static Integer getInteger(com.google.gwt.json.client.JSONObject json,
                                 String field)

getArray

public static com.google.gwt.json.client.JSONObject getArray(com.google.gwt.json.client.JSONValue json,
                                                             int i)

getArraySize

public static int getArraySize(com.google.gwt.json.client.JSONValue array)


Copyright © 2009-2011 SonarSource. All Rights Reserved.