Examples of toJson()


Examples of com.findwise.hydra.mongodb.MongoDocument.toJson()

    RemotePipeline rp = new HttpRemotePipeline("localhost", server.getPort(), "stage");
   
    String content = "xäöåx";

    String fileName = "test.txt";
    DocumentFile<Local> df = new DocumentFile<Local>(new LocalDocument(testDoc.toJson()).getID(), fileName, IOUtils.toInputStream(content, "UTF-8"));
    df.setEncoding("UTF-8");
   
    if(!rp.saveFile(df)) {
      fail("RemotePipeline.saveFile() returned false");
    }
View Full Code Here

Examples of com.game.cloudymon.entity.RouteMap.toJSON()

      Double lat = jsonObj.getDouble("lat");
      Double lng = jsonObj.getDouble("lng");
     
      RouteMap routeMap = PlayBean.getRouteMapByLatLng(lat, lng);
     
      returnVal(resp, routeMap.toJSON());
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

Examples of com.geekhub.lessons.lessonSix.json.adapters.JsonDataAdapter.toJson()

            }
            if (f.isAnnotationPresent(UseDataAdapter.class)) {
                UseDataAdapter a = f.getAnnotation(UseDataAdapter.class);
                Class c = a.value();
                JsonDataAdapter adapter = (JsonDataAdapter) c.newInstance();
                result.put(f.getName(), adapter.toJson(f.get(o)));
            } else {
                result.put(f.getName(), serialize(f.get(o)));
            }
            f.setAccessible(false);
        }
View Full Code Here

Examples of com.getit.todoapp.domain.Todo.toJson()

        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json; charset=utf-8");
        if (todo == null) {
            return new ResponseEntity<String>(headers, HttpStatus.NOT_FOUND);
        }
        return new ResponseEntity<String>(todo.toJson(), headers, HttpStatus.OK);
    }

  @RequestMapping(headers = "Accept=application/json")
    @ResponseBody
    public ResponseEntity<String> listJson(Authentication authentication) {
View Full Code Here

Examples of com.getit.todoapp.domain.Userinfo.toJson()

        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json; charset=utf-8");
        if (userinfo == null) {
            return new ResponseEntity<String>(headers, HttpStatus.NOT_FOUND);
        }
        return new ResponseEntity<String>(userinfo.toJson(), headers, HttpStatus.OK);
    }

  @RequestMapping(headers = "Accept=application/json")
    @ResponseBody
    public ResponseEntity<String> listJson() {
View Full Code Here

Examples of com.goodow.realtime.store.impl.DocumentBridge.toJson()

            callback.handle(new DefaultFutureResult<JsonObject>(new ReplyException(
                ReplyFailure.RECIPIENT_FAILURE, e.getMessage())));
            return;
          }
        }
        JsonObject root = new JsonObject(((JreJsonObject) snapshot.toJson()).toNative());
        snapshotData.putNumber(Key.VERSION, opVersion + 1).putObject(DeltaStorage.ROOT, root).
           putArray(Key.SNAPSHOT, new JsonArray(((JreJsonArray) snapshot.toSnapshot()).toNative()));
        callback.handle(new DefaultFutureResult<JsonObject>(snapshotData));
      }
    });
View Full Code Here

Examples of com.google.code.ckJsfEditor.Config.toJson()

            responseWriter.write(function);
            responseWriter.write(");\n");
        }
        responseWriter.write("var " + editor.resolveWidgetVar() + " = new CKEditor('" + editor.getClientId() + "'");
        if(config != null)
            responseWriter.write(", " + config.toJson());
        responseWriter.write(");\n");

        if(editor.getSaveMethod() != null && editor.isAjax()) {
            encodeSaveMethod(responseWriter, editor);
        } else if(editor.isAjax()) {
View Full Code Here

Examples of com.google.collide.dto.server.DtoServerImpls.GetFileContentsResponseImpl.toJson()

  void sendContent(
      Message<JsonObject> event, String path, FileContents fileContents, boolean fileExists) {
    GetFileContentsResponseImpl response = GetFileContentsResponseImpl.make()
        .setFileExists(fileExists).setFileContents((FileContentsImpl) fileContents);
    event.reply(Dto.wrap(response.toJson()));
  }

  /**
   * Iterates through all open, dirty edit sessions and saves them to disk.
   */
 
View Full Code Here

Examples of com.google.collide.dto.server.DtoServerImpls.ServerToClientDocOpsImpl.toJson()

        // Broadcast the applied DocOp all the participants, ignoring the sender.
        ServerToClientDocOpsImpl broadcastedDocOps =
            ServerToClientDocOpsImpl.make().setDocOps(appliedDocOpsList);
        vertx.eventBus().send("participants.broadcast", new JsonObject().putString(
            Participants.OMIT_SENDER_TAG, authorId).putString(
            "payload", broadcastedDocOps.toJson()));
        return broadcastedDocOps;
      } catch (DocumentOperationException e) {
        logger.error(String.format("Failed to apply DocOps [%s]", serializedDocOps));
      }
      return null;
View Full Code Here

Examples of com.google.collide.dto.server.DtoServerImpls.WorkspaceTreeUpdateBroadcastImpl.toJson()

    }
    vertx.eventBus().send("documents.fileSystemEvents", message);
    if (treeDirty) {
      broadcast.setNewTreeVersion(Long.toString(treeVersion));
      vertx.eventBus().send("participants.broadcast", new JsonObject().putString(
          Participants.PAYLOAD_TAG, broadcast.toJson()));
    }
  }

  /**
   * Strips out directory children for broadcast.
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.