Examples of optDouble()


Examples of org.json.JSONObject.optDouble()

    JSONObject payload = request.getPayload();

    String js = template.generate(
        request.getSession(),
        payload.optDouble("fromX"),
        payload.optDouble("fromY"),
        payload.optDouble("toX"),
        payload.optDouble("toY"),
        payload.optDouble("duration"));
    setJS(js);
  }
View Full Code Here

Examples of org.json.JSONObject.optDouble()

    String js = template.generate(
        request.getSession(),
        payload.optDouble("fromX"),
        payload.optDouble("fromY"),
        payload.optDouble("toX"),
        payload.optDouble("toY"),
        payload.optDouble("duration"));
    setJS(js);
  }
View Full Code Here

Examples of org.json.JSONObject.optDouble()

    String js = template.generate(
        request.getSession(),
        payload.optDouble("fromX"),
        payload.optDouble("fromY"),
        payload.optDouble("toX"),
        payload.optDouble("toY"),
        payload.optDouble("duration"));
    setJS(js);
  }

  @Override
View Full Code Here

Examples of org.json.JSONObject.optDouble()

        request.getSession(),
        payload.optDouble("fromX"),
        payload.optDouble("fromY"),
        payload.optDouble("toX"),
        payload.optDouble("toY"),
        payload.optDouble("duration"));
    setJS(js);
  }

  @Override
  public JSONObject configurationDescription() throws JSONException {
View Full Code Here

Examples of org.json.JSONObject.optDouble()

    public void testObject() {
        JSONObject json = OTJson.object("string", "string", "int", 123, "double", 123.456, "true", true, "false", false, "null", null);
        Assert.assertNotNull(json);
        Assert.assertEquals("string", json.optString("string"));
        Assert.assertEquals(123, json.optInt("int"));
        Assert.assertEquals(123.456, json.optDouble("double"), 1e-15);
        Assert.assertEquals(true, json.optBoolean("true"));
        Assert.assertEquals(false, json.optBoolean("false"));
        Assert.assertEquals(null, json.opt("null"));
    }
View Full Code Here

Examples of org.json.JSONObject.optDouble()

        JSONObject userJson = wrapped ? jsonObject.getJSONObject("user") : jsonObject;
        encodedId = userJson.getString("encodedId");
        displayName = userJson.getString("displayName");
        gender = Gender.valueOf(userJson.getString("gender"));
        dateOfBirth = FitbitApiService.getValidLocalDateOrNull(userJson.optString("dateOfBirth"));
        height = userJson.optDouble("height");
        weight = userJson.optDouble("weight");
        strideLengthWalking = userJson.optDouble("strideLengthWalking");
        strideLengthRunning = userJson.optDouble("strideLengthRunning");
        fullName = userJson.optString("fullName");
        nickname = userJson.optString("nickname");
View Full Code Here

Examples of org.json.JSONObject.optDouble()

        encodedId = userJson.getString("encodedId");
        displayName = userJson.getString("displayName");
        gender = Gender.valueOf(userJson.getString("gender"));
        dateOfBirth = FitbitApiService.getValidLocalDateOrNull(userJson.optString("dateOfBirth"));
        height = userJson.optDouble("height");
        weight = userJson.optDouble("weight");
        strideLengthWalking = userJson.optDouble("strideLengthWalking");
        strideLengthRunning = userJson.optDouble("strideLengthRunning");
        fullName = userJson.optString("fullName");
        nickname = userJson.optString("nickname");
        country = userJson.optString("country");
View Full Code Here

Examples of org.json.JSONObject.optDouble()

        displayName = userJson.getString("displayName");
        gender = Gender.valueOf(userJson.getString("gender"));
        dateOfBirth = FitbitApiService.getValidLocalDateOrNull(userJson.optString("dateOfBirth"));
        height = userJson.optDouble("height");
        weight = userJson.optDouble("weight");
        strideLengthWalking = userJson.optDouble("strideLengthWalking");
        strideLengthRunning = userJson.optDouble("strideLengthRunning");
        fullName = userJson.optString("fullName");
        nickname = userJson.optString("nickname");
        country = userJson.optString("country");
        state = userJson.optString("state");
View Full Code Here

Examples of org.json.JSONObject.optDouble()

        gender = Gender.valueOf(userJson.getString("gender"));
        dateOfBirth = FitbitApiService.getValidLocalDateOrNull(userJson.optString("dateOfBirth"));
        height = userJson.optDouble("height");
        weight = userJson.optDouble("weight");
        strideLengthWalking = userJson.optDouble("strideLengthWalking");
        strideLengthRunning = userJson.optDouble("strideLengthRunning");
        fullName = userJson.optString("fullName");
        nickname = userJson.optString("nickname");
        country = userJson.optString("country");
        state = userJson.optString("state");
        city = userJson.optString("city");
View Full Code Here

Examples of org.json.JSONObject.optDouble()

        for (int i = 0; i < fields.length(); i++) {
          JSONObject thisField = fields.getJSONObject(i);
          String name = thisField.getString("name");
          String luceneName = thisField.optString("lucenename",name);
          if (luceneName == null) name = null;
          double boost = thisField.optDouble("boost", 1.0);
          boolean regexp = thisField.optBoolean("regexp", false);
          String type = thisField.optString("type","string");
          IndexType t = IndexType.getIndexTypeFromString(type);
          if (t == IndexType.DATE) {
            try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.