/// A <see cref="JsonConverter{T}"/> that doesn't actually serialize the object, but instead serializes the name given to it by the underlying <see cref="Dictionary{T,T}"/>.
/// Optionally, the name of a <see cref="Dictionary{TKey,TValue}"/> can be passed to this converter when used in the <see cref="JsonConverterAttribute"/> by passing the arguments for the <see cref="StaticJsonConverter{T}(Type,string)"/> constructor as <see cref="JsonConverterAttribute.ConverterParameters"/>.
/// The entries, or registry, that this static json converter uses.
/// </summary>
protectedreadonlyDictionary<string,T>Entries;
/// <summary>
/// The inverse of this static json converter's <see cref="Entries"/>, mapping the values to their respective keys.
/// Note that this dictionary is only created once and is not automatically updated should the <see cref="Entries"/> be modified.
/// </summary>
protectedreadonlyDictionary<T,string>Inverse;
/// <summary>
/// Whether to throw a <see cref="KeyNotFoundException"/> in <see cref="ReadJson"/> if a key is missing, or throw a <see cref="JsonSerializationException"/> if a stored json value is not a string.
/// If this is <see langword="false"/>, <see cref="ReadJson"/> returns <see langword="default"/> instead.
/// <param name="throwOnRead">Whether to throw a <see cref="KeyNotFoundException"/> in <see cref="ReadJson"/> if a key is missing, or throw a <see cref="JsonSerializationException"/> if a stored json value is not a string. If this is <see langword="false"/>, <see cref="ReadJson"/> returns <see langword="default"/> instead.</param>
/// Creates a new static json converter by finding the underlying <see cref="Dictionary{TKey,TValue}"/> from the given type and member name
/// </summary>
/// <param name="type">The type that the dictionary is declared in</param>
/// <param name="memberName">The name of the dictionary itself</param>
/// <param name="throwOnRead">Whether to throw a <see cref="KeyNotFoundException"/> in <see cref="ReadJson"/> if a key is missing, or throw a <see cref="JsonSerializationException"/> if a stored json value is not a string. If this is <see langword="false"/>, <see cref="ReadJson"/> returns <see langword="default"/> instead.</param>
/// Returns the entries, or registry, that this static json converter should use, using reflection to find the passed <paramref name="memberName"/> in the passed <paramref name="type"/>.
/// </summary>
/// <param name="type">The type to find the entries in.</param>
/// <param name="memberName">The name of the field or property that the entries are in within the given <paramref name="type"/>.</param>
/// <returns>The found property or field's value.</returns>
/// <exception cref="ArgumentException">Thrown if there is no property or field with the <paramref name="memberName"/> in the given <paramref name="type"/>.</exception>
/// <exception cref="InvalidCastException">Thrown if the value of the <paramref name="memberName"/> is not of the expected type.</exception>
/// Creates the inverse version of the passed <paramref name="entries"/>, mapping the values to their keys, and throws an exception if there are any duplicate values.
/// </summary>
/// <param name="entries">The entries to create an inverse of.</param>
/// <returns>The inverse of the given <paramref name="entries"/>, mapping the values to their keys.</returns>
/// <exception cref="ArgumentException">Thrown if the <paramref name="entries"/> contains duplicate values, making it impossible to create a valid inverse.</exception>