Examples of deserialize()


Examples of com.facebook.presto.hive.shaded.org.apache.thrift.TDeserializer.deserialize()

      } catch (JSONException ignored) {}
      checkCompatibility(version, fcversion);
      String tableDesc = jsonContainer.getString("table");
      Table table = new Table();
      TDeserializer deserializer = new TDeserializer(new TJSONProtocol.Factory());
      deserializer.deserialize(table, tableDesc, "UTF-8");
      JSONArray jsonPartitions = new JSONArray(jsonContainer.getString("partitions"));
      List<Partition> partitionsList = new ArrayList<Partition>(jsonPartitions.length());
      for (int i = 0; i < jsonPartitions.length(); ++i) {
        String partDesc = jsonPartitions.getString(i);
        Partition partition = new Partition();
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize()

            }
            // creator property?
            SettableBeanProperty prop = creator.findCreatorProperty(propName);
            if (prop != null) {
                // Last property to set?
                Object value = prop.deserialize(jp, ctxt);
                if (buffer.assignParameter(prop.getPropertyIndex(), value)) {
                    jp.nextToken();
                    Map<Object,Object> result;
                    try {
                        result = (Map<Object,Object>)creator.build(buffer);
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.deser.SettableBeanProperty.deserialize()

                if (pending == null) {
                    int len = _beanProperties.size();
                    pending = new Object[len + len];
                }
                pending[pendingIx++] = prop;
                pending[pendingIx++] = prop.deserialize(jp, ctxt);
                continue;
            }

            // Maybe it's "message"?
            if (PROP_NAME_MESSAGE.equals(propName)) {
View Full Code Here

Examples of com.facebook.thrift.TDeserializer.deserialize()

    hm.bonks.put("poe", stage2);


    byte[] binaryCopy = binarySerializer.serialize(hm);
    HolyMoley hmCopy = new HolyMoley();
    binaryDeserializer.deserialize(hmCopy, binaryCopy);
    HolyMoley hmCopy2 = new HolyMoley(hm);

    if (!hm.equals(hmCopy))
      throw new RuntimeException("copy constructor modified the original object!");
    if (!hmCopy.equals(hmCopy2))
View Full Code Here

Examples of com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize()

                if (pending == null) {
                    int len = _beanProperties.size();
                    pending = new Object[len + len];
                }
                pending[pendingIx++] = prop;
                pending[pendingIx++] = prop.deserialize(jp, ctxt);
                continue;
            }

            // Maybe it's "message"?
            if (PROP_NAME_MESSAGE.equals(propName)) {
View Full Code Here

Examples of com.google.gson.JsonDeserializationContext.deserialize()

  public void testDeserializeJsonRpcResponse() throws Exception {
    String response = "{'id':'op1','data':{'newBlipId':'blip1','unknown':'value'}}";
    JsonElement jsonElement = new JsonParser().parse(response);

    JsonDeserializationContext mockContext = mock(JsonDeserializationContext.class);
    when(mockContext.deserialize(any(JsonElement.class), eq(String.class))).thenAnswer(
        new Answer<String>() {
          public String answer(InvocationOnMock invocation) {
            return ((JsonPrimitive) (invocation.getArguments()[0])).getAsString();
          }
        });
View Full Code Here

Examples of com.google.gson.annotations.Expose.deserialize()

  public boolean shouldSkipField(FieldAttributes f) {
    Expose annotation = f.getAnnotation(Expose.class);
    if (annotation == null) {
      return true;
    }
    return !annotation.deserialize();
  }
}
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.ProxySerializer.deserialize()

    assertNotNull(key);

    // Use a new instance
    store = new DefaultProxyStore(store.encode());
    s = req.getSerializer(store);
    T restored = s.deserialize(id.getProxyClass(), key);
    AutoBean<? extends BaseProxy> restoredBean = AutoBeanUtils.getAutoBean(restored);
    assertNotSame(proxy, restored);
    /*
     * Performing a regular assertEquals() or even an AutoBeanUtils.diff() here
     * is wrong. If any of the objects in the graph are unpersisted, it's
View Full Code Here

Examples of com.googlecode.javaewah.EWAHCompressedBitmap.deserialize()

  }

  private static EWAHCompressedBitmap readBitmap(DataInput dataInput)
      throws IOException {
    EWAHCompressedBitmap bitmap = new EWAHCompressedBitmap();
    bitmap.deserialize(dataInput);
    return bitmap;
  }
}
View Full Code Here

Examples of com.googlecode.jsonplugin.annotations.JSON.deserialize()

                Object value = elements.get(name);
                Method method = prop.getWriteMethod();

                if (method != null) {
                    JSON json = method.getAnnotation(JSON.class);
                    if ((json != null) && !json.deserialize()) {
                        continue;
                    }

                    //use only public setters
                    if (Modifier.isPublic(method.getModifiers())) {
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.