@SuppressWarnings("unchecked")
	protected <Type> Type select(String paths, Class<Type> type) {
		if (paths == null || this.parsed == null) {
			return null;
		}

		// split the path
		int start = 0;
		int end = start;
		// Map<String, Object> current = this;
		Json current = this;
		while (end < paths.length()) {
			if (paths.charAt(end) != '.') {
				// not key break
				if (end == paths.length() - 1) {
					// the end
					Object object = current.parsed.get(paths.substring(start, end + 1));
					if (object != null && type.isAssignableFrom(object.getClass())) {
						return (Type) object;
					} else {
						return null;
					}
				} else {
					// move next
					end++;
					continue;
				}
			} else {
				// potential key break
				Object object = current.parsed.get(paths.substring(start, end));
				if (end != paths.length() - 1) {
					// not the end , ok
					if (object instanceof Json) {
						current = (Json) object;
						start = ++end;
						continue;
					} else {
						// should be map
						return null;
					}
				} else {
					// illegal
					return null;
				}
			}
		}

		return null;
	}