/** * clone by converting to JSON and back again. * This is much less efficient than any Java clone process. * @param instance instance to duplicate * @return a new instance * @throws IOException problems. */ public T fromInstance(T instance) throws IOException { return fromJson(toJson(instance)); }
return fromJson(json); } catch (JsonProcessingException e) { throw new InvalidRecordException(path, e.toString(), e);
return fromJson(json); } catch (JsonProcessingException e) { throw new InvalidRecordException(path, e.toString(), e);