tryGet<T extends Object> method

T? tryGet<T extends Object>(
  1. ReadOnlyAccessor<T, K, R> accessor
)

Returns the decoded value for the given accessor, or null if missing or if decoding fails.

Implementation

T? tryGet<T extends Object>(final ReadOnlyAccessor<T, K, R> accessor) {
  try {
    return call(accessor);
  } catch (_) {
    return null;
  }
}