Skip to content

Conversation

@jgillich
Copy link
Collaborator

Parse files without schemaLocation, creator or timezones

Parse files without schemaLocation, creator or timezones
To match naming on track
import kotlinx.serialization.encoding.Encoder

@OptIn(ExperimentalTime::class)
internal object InstantSerializer : KSerializer<Instant> {
Copy link
Collaborator

@sargunv sargunv Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd name it for the specific intended format, like Iso8601InstantSerializer in this case.

Though I'm curious, does the default serializer not do the same format?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see the offset component is optional here.

So I'd name it with that, like UtcDefaultInstantSerializer or something along those lines

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, Instant doesn't parse without offsets and LocalDateTime doesn't parse with offsets. Pretty annoying

Renamed to UtcDefaultInstantSerializer

@jgillich jgillich merged commit 9d874db into maplibre:main Oct 27, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants