Given a field KeyValuePair {[fldQBmD4P1IuYiBVI, ValueKind = Array : "["recQtNiswAnjzGJHO"]"]}, attempting to deserialize it with record.GetField<List<string>>("fldQBmD4P1IuYiBVI") throws the following exception
'record.GetField<List<string>>("fldQBmD4P1IuYiBVI")' threw an exception of type 'System.NotSupportedException'
Data: {System.Collections.ListDictionaryInternal}
HResult: -2146233067
HelpLink: null
InnerException: null
Message: "The only generic type supported is Nullable<T>"
Source: "AirtableApiClient"
StackTrace: " at AirtableApiClient.AirtableRecord.ParsePrimitiveValue(JsonElement element, Type type)\r\n at AirtableApiClient.AirtableRecord.GetField[T](String fieldName)"
TargetSite: {System.Object ParsePrimitiveValue(System.Text.Json.JsonElement, System.Type)}
However, deserialization with atomic types works as expected.
Currently, as there does not seem to be support for returning records with field keys as field IDs (only names), I have made a direct call to the Airtable Web API and have then read that JSON response into an AirtableRecord instance. This AirtableRecord instance is what is being used in the above example and is why the field key is not the human readable column name.
Given a field KeyValuePair
{[fldQBmD4P1IuYiBVI, ValueKind = Array : "["recQtNiswAnjzGJHO"]"]}
, attempting to deserialize it withrecord.GetField<List<string>>("fldQBmD4P1IuYiBVI")
throws the following exceptionHowever, deserialization with atomic types works as expected.
Currently, as there does not seem to be support for returning records with field keys as field IDs (only names), I have made a direct call to the Airtable Web API and have then read that JSON response into an AirtableRecord instance. This AirtableRecord instance is what is being used in the above example and is why the field key is not the human readable column name.