Examples of JSONObject


Examples of org.nutz.json.bean.JsonObject

        sw.stop();
        System.out.println("Fast-Json 50w次耗时: " + sw.getDuration());
    }
   
    public void nutzJson(int time) {
        JsonObject obj = new JsonObject();
        obj.setName("wendal");
        for (int i = 0; i < time; i++) {
            String jsonStr = Json.toJson(obj);
            obj = Json.fromJson(JsonObject.class, jsonStr);
        }
    }
View Full Code Here

Examples of org.openfaces.org.json.JSONObject

        String rightBottomImageUrl_rollover = (String) slider.getAttributes().get("rightBottomButtonRolloverImageUrl");
        rightBottomImageUrl_rollover = Resources.getURL(context, rightBottomImageUrl_rollover, null, isHorizontal ? DEFAULT_RB_BUTTON_ROLLOVER_URL : DEFAULT_VERTICAL_RB_BUTTON_ROLLOVER_URL);


        JSONObject options;

        try {
            options = createFormatOptions(context, slider);
        } catch (JSONException e) {
            throw new FacesException(e);
View Full Code Here

Examples of org.openjena.atlas.json.JsonObject

    {}
   
    @Override
    public void startObject(long currLine, long currCol)
    {
        objects.push(new JsonObject()) ;
    }
View Full Code Here

Examples of org.openx.data.jsonserde.json.JSONObject

        initialize(instance);

        System.out.println("deserialize");
        Writable w = new Text("{\"one\":\"\\a\\v\"}");

        JSONObject result = (JSONObject) instance.deserialize(w);
        assertEquals("",result.get("one").toString().trim());
    }
View Full Code Here

Examples of org.pac4j.oauth.profile.JsonObject

   
    public JsonObject convert(final Object attribute) {
        if (attribute != null && (attribute instanceof String || attribute instanceof JsonNode)) {
            try {
                final Constructor<? extends JsonObject> constructor = this.clazz.getDeclaredConstructor();
                final JsonObject jsonObject = constructor.newInstance();
                jsonObject.buildFrom(attribute);
                return jsonObject;
            } catch (final Exception e) {
                logger.error("Cannot build JsonObject : {}", e, this.clazz);
            }
        }
View Full Code Here

Examples of org.primefaces.json.JSONObject

      for(String paramName : params.keySet()) {
       
        writer.write("<callbackParam>");
        try {
          Object paramValue = params.get(paramName);
          String json = isBean(paramValue) ? "{\"" + paramName + "\":" + new JSONObject(paramValue).toString() + "}": new JSONObject().put(paramName, paramValue).toString();
          writer.write(json);
        } catch (JSONException e) {
          logger.log(Level.SEVERE, "Error in serializing callback parameter \"{0}\"", paramName);
          throw new FacesException(e.getMessage());
        }
View Full Code Here

Examples of org.richfaces.json.JSONObject

    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        try {
            if (value.charAt(0) == '{') {
                return new JSONObject(value);
            }
            return new JSONArray(value);
        } catch (JSONException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of org.rssowl.core.internal.interpreter.json.JSONObject

    IModelFactory typesFactory = Owl.getModelFactory();
    IFeed feed = typesFactory.createFeed(null, link);
    feed.setBase(readerToHTTP(link));
    try {
      reader = new InputStreamReader(inS, UTF_8);
      JSONObject obj = new JSONObject(new JSONTokener(reader));
      Owl.getInterpreter().interpretJSONObject(obj, feed);
    } catch (JSONException e) {
      isError = true;
      throw new ParserException(Activator.getDefault().createErrorStatus(e.getMessage(), e));
    } catch (IOException e) {
View Full Code Here

Examples of org.slim3.repackaged.org.json.JSONObject

        return object.optString(name, null);
    }

    @Override
    public String readProperty(String name){
        JSONObject o = object.optJSONObject(this.name);
        if(o == null) return null;
        return o.optString(name, null);
    }
View Full Code Here

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

        doJsonObject("", parser.getPosition());
      } else if (current == openSquare){
        doJsonArray("", parser.getPosition());
      } else {
        JsonError jsonError = new JsonError(parent, "JSON should begin with { or [");
        root = new JsonObject(parent, "");
        root.addChild(jsonError);
        throw new JsonTextOutlineParserException();
      }
     
    } catch (Exception e) {
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.