Package com.google.walkaround.proto.gson

Examples of com.google.walkaround.proto.gson.DeltaGsonImpl


    return new WaveletDiffSnapshotGsonImpl();
  }

  @Override
  public Delta createDelta() {
    return new DeltaGsonImpl();
  }
View Full Code Here


      return next.convert(entity);
    } else {
      String json = DatastoreUtil.getExistingProperty(entity, DATA_PROPERTY, Text.class).getValue();
      try {
        JSONObject obj = new JSONObject(json);
        DeltaGsonImpl delta = new DeltaGsonImpl();
        delta.setAuthor(obj.getJSONObject("author").getString("email"));
        delta.setTimestampMillis(obj.getLong("time"));
        delta.setOperation(SERIALIZER.deserializeOp(obj.getJSONObject("op").toString()));
        return new ChangeData<String>(new ClientId(obj.getString("sid")),
            GsonProto.toJson(delta));
      } catch (MessageException e) {
        throw new RuntimeException("MessageException converting " + entity, e);
      } catch (JSONException e) {
View Full Code Here

    return GsonProto.toJson((DeltaGsonImpl) input);
  }

  @Override
  public Delta deserializeDelta(String input) throws MessageException {
    return GsonProto.fromGson(new DeltaGsonImpl(), input);
  }
View Full Code Here

TOP

Related Classes of com.google.walkaround.proto.gson.DeltaGsonImpl

Copyright © 2018 www.massapicom. 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.