-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use more concise data types for deserialization #5
Comments
There is also a lot of information which can be expressed using proper enum types: https://github.com/OpenIRacingTools/Sdk/tree/master/OpenIRacingTools.Sdk/Model/Enums The code mentioned above contains an |
Yes, this was/is on the roadmap, something "to be done" |
@mburtscher if you want to do this could you do some testing on serialization times? I'm of the opinion that we should be leaving it down to the developer to do what they want with the data. Now the reason for the serialization module was to just give the "basics" and therefore the basic types that iRacing gives out. So if they give you a float it should be serialized as a float. There is a Client separate from this SDK which may be the place to do this https://github.com/SlevinthHeaven/s7evemetry |
@LuckyNoS7evin I'm sorry for not responding. I don't think that I will have the time to work on any of this the coming weeks/months. So feel free to close if you don't feel like it was a significant improvement. |
Currently most of the data is deserialized with either
string
,int
andfloat
. However there are several data points which could use much more concise data types such asTimeSpan
,bool
or custom implementations forSpeed
,Distance
etc.I have created some custom type converters for YamlDotNet in my SDK project:
https://github.com/OpenIRacingTools/Sdk/tree/master/OpenIRacingTools.Sdk/Yaml
They can be registered in YamlDotNet using
WithTypeConverter()
method:https://github.com/OpenIRacingTools/Sdk/blob/master/OpenIRacingTools.Sdk/Sdk.cs#L55
The text was updated successfully, but these errors were encountered: