failOnUnknown

fun failOnUnknown(): JsonAdapter<T>

Returns a JSON adapter equal to this, but that throws a JsonDataException when unknown names and values are encountered. This constraint applies to both the top-level message handled by this type adapter as well as to nested messages.