Code example for JsonArray

Methods: get

0
		super(id);
		this.value = value;
	} 
	 
	public ValueReference(JsonArray refTuple) {
		this(refTuple.get(1).getAsString(), refTuple.get(2).getAsString().getBytes());
	} 
	 
	public <T> T getValueAsObject(Class<T> clazz) {
		Object ret = null;
		try { 
			ret = new ObjectInputStream(new ByteArrayInputStream(this.value)).readObject();
			return clazz.cast(ret);
		} catch (IOException e) {
			throw new RuntimeException(e);
		} catch (ClassNotFoundException e) {
			throw new RuntimeException(e);
		} 
	} 
 
Experience pair programming with AI  Get Codota for Java