Examples of JSONBoolean


Examples of com.google.gwt.json.client.JSONBoolean

    while (true) {
      if (null == jsonValue) {
        break;
      }
      final JSONBoolean jsonBoolean = jsonValue.isBoolean();
      if (null == jsonBoolean) {
        break;
      }

      value = jsonBoolean.booleanValue();
      break;
    }

    return value;
  }
View Full Code Here

Examples of com.google.gwt.json.client.JSONBoolean

 
  public static Boolean getJsonBoolean(JSONObject object, String key) {
    JSONValue value = object.get(key);
    if(value == null)
      return null;
    JSONBoolean b = value.isBoolean();
    if( b == null)
      return null;
    return new Boolean(b.booleanValue());
  }
View Full Code Here

Examples of org.openjena.atlas.json.JsonBoolean

    }

    @Override
    public void valueBoolean(boolean b, long currLine, long currCol)
    {
        value = new JsonBoolean(b) ;
    }
View Full Code Here

Examples of org.sourceforge.jsonedit.core.outline.elements.JsonBoolean

   * @throws JsonReaderException
   * @throws JsonTextOutlineParserException
   */
  private void doJsonTrueValue(String key, int start) throws JsonReaderException, JsonTextOutlineParserException, BadLocationException, BadPositionCategoryException  {
   
    JsonBoolean jsonBoolean = new JsonBoolean(parent, key);
    parent.addChild(jsonBoolean);
    jsonBoolean.setStart(start, doc);
   
    char ch = parser.getNextChar();
    if (ch != r) {
      JsonError jsonError = new JsonError(parent, "Expect true value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    ch = parser.getNextChar();
    if (ch != u) {
      JsonError jsonError = new JsonError(parent, "Expect true value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    ch = parser.getNextChar();
    if (ch != e) {
      JsonError jsonError = new JsonError(parent, "Expect true value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    jsonBoolean.setLength(parser.getPosition() - start + 1);
   
    ch = parser.getNextClean();
    if (isNotClosed(ch)) {
      JsonError jsonError = new JsonError(parent, "Expected end value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    jsonBoolean.setValue("true");
  }
View Full Code Here

Examples of org.sourceforge.jsonedit.core.outline.elements.JsonBoolean

   * @throws JsonReaderException
   * @throws JsonTextOutlineParserException
   */
  private void doJsonFalseValue(String key, int start) throws JsonReaderException, JsonTextOutlineParserException, BadLocationException, BadPositionCategoryException  {
   
    JsonBoolean jsonBoolean = new JsonBoolean(parent, key);
    parent.addChild(jsonBoolean);
    jsonBoolean.setStart(start, doc);
   
    char ch = parser.getNextChar();
    if (ch != a) {
      JsonError jsonError = new JsonError(parent, "Expect true value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    ch = parser.getNextChar();
    if (ch != l) {
      JsonError jsonError = new JsonError(parent, "Expect true value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    ch = parser.getNextChar();
    if (ch != s) {
      JsonError jsonError = new JsonError(parent, "Expect true value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    ch = parser.getNextChar();
    if (ch != e) {
      JsonError jsonError = new JsonError(parent, "Expect true value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    jsonBoolean.setLength(parser.getPosition() - start + 1);
    ch = parser.getNextClean();
    if (isNotClosed(ch)) {
      JsonError jsonError = new JsonError(parent, "Expected end value");
      parent.addChild(jsonError);
      throw new JsonTextOutlineParserException();
    }
   
    jsonBoolean.setValue("false");
  }
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.