Examples of toJSONString()


Examples of azkaban.util.json.JSONUtils.toJSONString()

      catch (Exception e) {
        e.printStackTrace();
        throw e;
      }
      System.out.println(oldObj);
      String returnString = utils.toJSONString(oldObj);
      System.out.println(returnString);
      Map obj = null;
      try {
        obj = utils.fromJSONString(returnString);
      }
View Full Code Here

Examples of com.alibaba.fastjson.JSON.toJSONString()

    public void test_floatArray() throws Exception {
        float[] a = new float[] { 1, 2 };
        String text = JSON.toJSONString(a);
        JSON json = (JSON) JSON.parse(text);
        Assert.assertEquals("[1.0,2.0]", json.toJSONString());
    }

    public void test_doubleArray() throws Exception {
        double[] a = new double[] { 1, 2 };
        String text = JSON.toJSONString(a);
View Full Code Here

Examples of com.alibaba.fastjson.JSONAware.toJSONString()

    public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType) throws IOException {
        SerializeWriter out = serializer.getWriter();

        JSONAware aware = (JSONAware) object;
        out.write(aware.toJSONString());
    }
}
View Full Code Here

Examples of com.alibaba.fastjson.JSONObject.toJSONString()

    PushNotificationMessage pnm = new PushNotificationMessage();
    pnm.setAddTime(CTCommon.getNowTime());
    pnm.setTitle(title);
    pnm.setMessage(message);
    if (null != rowdata)
      pnm.setRowdata(rowdata.toJSONString());
    pnm_service.add(pnm);

    retJson = new JSONObject();
    retJson.put("messageID", pnm.getEncodedKey());
    for (CarPhoneRelation o : cpr_list) {
View Full Code Here

Examples of com.baidu.ueditor.define.State.toJSONString()

        state = new FileManager( conf ).listFile( start );
        break;
       
    }
   
    return state.toJSONString();
   
  }
 
  public int getStartIndex () {
   
View Full Code Here

Examples of com.bazaarvoice.jolt.JsonUtil.toJsonString()

        AssertJUnit.assertEquals( QueryParam.AND, nestedAndFilter.getQueryParam() );
        AssertJUnit.assertEquals( 2, nestedAndFilter.getFilters().size() );


        // SERIALIZE TO STRING to test serialization logic
        String unitTestString = jsonUtil.toJsonString( queryFilter );

        // LOAD and Diffy the plain vanilla JSON versions of the documents
        Map<String, Object> actual   = JsonUtils.jsonToMap( unitTestString );
        Map<String, Object> expected = JsonUtils.classpathToMap( testFixture );
View Full Code Here

Examples of com.box.boxjavalibv2.jsonentities.MapJSONStringEntity.toJSONString()

        parentEntity.put(Constants.ID, parentId);

        MapJSONStringEntity entity = new MapJSONStringEntity();
        entity.put(KEY_PARENT, parentEntity);
        entity.put(KEY_NAME, name);
        return new StringBody(entity.toJSONString(new ObjectMapper()), Charset.forName(CharEncoding.UTF_8));
    }

    private static MultipartEntityWithProgressListener getNewVersionMultipartEntity(final String name, final File file) throws UnsupportedEncodingException {
        MultipartEntityWithProgressListener me = new MultipartEntityWithProgressListener(HttpMultipartMode.BROWSER_COMPATIBLE);
        me.addPart(name, new FileBody(file, name, "", CharEncoding.UTF_8));
View Full Code Here

Examples of com.denormans.facebookgwt.api.client.auth.FBLoginOptions.toJSONString()

  @UiHandler ("loginButton")
  protected void handleLoginButtonClick(final ClickEvent event) {
//    FBLoginOptions loginOptions = sFBLoginOptionsEditorDriver.flush();
    FBLoginOptions loginOptions = loginOptionsEditor.flush();

    Log.info("Login options: " + loginOptions.toJSONString());

    FBGWT.Auth.login(loginOptions, new AsyncCallback<FBAuthEventResponse>() {
      @Override
      public void onFailure(final Throwable caught) {
        handleError("Error logging in", caught);
View Full Code Here

Examples of com.denormans.facebookgwt.api.client.graph.options.FeedPostOptions.toJSONString()

  @UiHandler ("postToWallButton")
  public void handlePostToWallClick(final ClickEvent event) {
    FeedPostOptions postOptions = FeedPostOptions.createFeedPostOptions().setMessage(postToWallMessageTextBox.getText());

    Log.info("Post options: " + postOptions.toJSONString());

    FBGWT.Graph.User.postToWall(postOptions, new AsyncCallback<Post>() {
      @Override
      public void onFailure(final Throwable caught) {
        handleError("Error posting to wall", caught);
View Full Code Here

Examples of com.denormans.facebookgwt.api.client.ui.options.FriendAddOptions.toJSONString()

  @UiHandler ("friendAddButton")
  public void handleFriendAddButtonClick(final ClickEvent event) {
    FriendAddOptions friendAddOptions = FriendAddOptions.createFriendAddOptions(friendAddIDTextBox.getText());

    Log.info("Friend add options: " + friendAddOptions.toJSONString());

    FBGWT.UI.addFriend(DisplayFormats.Dialog, friendAddOptions, new AsyncCallback<FriendAddCallbackResponse>() {
      @Override
      public void onFailure(final Throwable caught) {
        handleError("Error adding friend", caught);
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.