Choose which parser to use based on the version field (i.e. use version 1 if the version is number 1, and if version is a semantic version string then use its major version number)
Raise an error if the version field has an unsupported major version number.
I also think we should remove (well, deprecate) the version field from the public interface of the LocationHistoryData class. It's an implementation detail of how the data is stored. Let's deprecate it and make it just always return 1.
Handle the versioning rules introduced in https://github.com/ably/ably-asset-tracking-common/pull/67, when unarchiving
LocationHistoryData
objects.version
field (i.e. use version 1 if the version is number1
, and if version is a semantic version string then use its major version number)version
field has an unsupported major version number.version
field from the public interface of theLocationHistoryData
class. It's an implementation detail of how the data is stored. Let's deprecate it and make it just always return1
.version
field correctly when archiving.