AdrianJSClark / aydsko-iracingdata

A .NET access library for querying the iRacing "Data" API.
MIT License
28 stars 8 forks source link

Incorrect datatype for RecentEvents.PercentRank field #210

Closed JesGot closed 2 months ago

JesGot commented 2 months ago

Aydsko.iRacingData.Member.RecentEvents.PercentRank seems to have an incorrect datatype.

When calling GetMemberProfileAsync for a certain CustomerId, I got this exception:

System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $.recent_events[1].percent_rank | LineNumber: 836 | BytePositionInLine: 31.

Tried changing it to decimal locally and the value was 0.8369153:

image

AdrianJSClark commented 2 months ago

Apologies! I was hoping to get to this over the weekend, but time got away from me. I'll get a fix out ASAP.

Sometimes my sample calls don't include data for all the fields, so I have to guess at the data types. I appreciate the detailed report.