Closed laurent-afs closed 7 months ago
For what it's worth, we had to downgrade to 1.1.5 for this to work again. Anything including and above 1.1.6 introduces that breaking change.
1.1.6 was released when I replaced Newtonsoft.json with System.Text.Json. 6.0.2 [JsonProperty("Country Code")] should be [JsonPropertyName("Country Code")]
I cannot duplicate your problem.
My test base has field names with spaces in them such as "Country Code".
I wrapped my class in a class name Artist and call:
public class Artist
{
public string Name { get; set; }
public List
[JsonPropertyName("On Display?")]
public bool OnDisplay { get; set; }
public List<string> Collection { get; set; }
public List<string> Genre { get; set; }
[JsonPropertyName("Country Code")]
public string CountryCode{ get; set; }
}
Task<AirtableListRecordsResponse<Artist>> task = airtableBase.ListRecords<Artist>(TABLE_NAME);
var response = await task;
var records = response.Records.ToList();
Artist AlHeld = records[0].Fields;
Console.WriteLine(AlHeld.CountryCode); // The output looks correct
No more replies from user. Problem considered solved.
Hi,
We've been using this package for a little while now without any issues, and had to upgrade recently from 1.1.4 to 1.4.0 (the main purpose of the upgrade was being able to use an access token instead of a deprecated API key).
The upgrade seems to have broken some part of the functionality - we have a DTO representing our records in Airtable for mapping purposes, with the fields defined as such:
Most fields are pulled through just fine, only the ones with a whitespace in the name aren't. Is there a work around for this? If that helps this is how we're listing records using AirtableBase. In the following example T is the DTO mentioned above.
Thank you!