Skip to content
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

[BUG] Encoding of coordinates, latitude and longitude, differ between CSBS & NYT #301

Closed
ChuckVanzant opened this issue Apr 25, 2020 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@ChuckVanzant
Copy link

The encoding of coordinates, latitude and longitude, differ between these two sources:

NYT - v2/locations?source=nyt&timelines=true" - properties encoded as numbers
"coordinates":{"latitude":0,"longitude":0}

CSBS - v2/locations?source=csbs - properties encoded as strings
"coordinates":{"latitude":"40.71455","longitude":"-74.00714"}

This causes a deserializing exception when using the same destination classes.
Workarounds are to use a cloned set of destination classes or to replace all NYT instances of {"latitude":0,"longitude":0} with {"latitude":"0","longitude":"0"} since they are all zeroes anyway as long as they will always be zeroes.

@ChuckVanzant ChuckVanzant added the bug Something isn't working label Apr 25, 2020
@Kilo59
Copy link
Collaborator

Kilo59 commented Apr 25, 2020

I agree this is probably worth fixing. I'd be happy to accept a pull request to address this.

@Kilo59 Kilo59 added the duplicate This issue or pull request already exists label Apr 26, 2020
@Kilo59
Copy link
Collaborator

Kilo59 commented Apr 26, 2020

As per issue #303 the values are returned as null not numbers.
Still worth fixing of course 😄

@Kilo59 Kilo59 closed this as completed Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants