code: public static final Object deserialize(byte[] bytes) throws Exception {
  		if (bytes == null || bytes.length < 4) {
  			return new LinkedHashMap<>();
  		}
  
  		// Try to deserialize content as Object (type-safe serialization)
  		if (bytes[0] == 1) {
  			try {
  				ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
  				bais.skip(1);
  				return new ObjectInputStream(bais).readObject();
  			} catch (Throwable ignored) {
  			}
  		}
  
  		// Read content as JSON
  		String json = new String(Arrays.copyOfRange(bytes, 1, bytes.length), StandardCharsets.UTF_8);
  		return TreeReaderRegistry.getReader(null).parse(json);
  	}
docs: --- COMMON OBJECT DESERIALIZER ---