Examples of IJsonInput


Examples of org.structr.core.IJsonInput

  }

  @Override
  public IJsonInput deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {

    IJsonInput jsonInput = null;
    JsonInput wrapper = null;
    if (json.isJsonObject()) {
      jsonInput = new JsonSingleInput();
      wrapper = deserialize(json, context);
      jsonInput.add(wrapper);

    } else if(json.isJsonArray()) {
      jsonInput = new JsonSingleInput();

      JsonArray array = json.getAsJsonArray();
      for(JsonElement elem : array) {
        wrapper = deserialize(elem, context);
        jsonInput.add(wrapper);
      }
    }

    return jsonInput;
  }
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.