001package com.nimbusds.common.json; 002 003 004/** 005 * Key extractor, intended for {@link JSONObjectWriter} use. 006 */ 007public interface KeyExtractor<T> { 008 009 010 /** 011 * Extracts or determines a JSON object key from the specified object. 012 * 013 * @param object The object. Must not be {@code null}. 014 * 015 * @return The JSON object key, {@code null} if extraction failed. 016 */ 017 String extractKey(final T object); 018}