String IDs — API Breaking Change

Hey all, just a heads up that we’re merging a breaking API change soon.

Going forward all IDs are going to be JSON strings instead of JSON numbers. This is because we’re paving the way for non-sequential snowflake ids, and Javascript (or any library deserializing JSON numbers as 64-bit floating points) can’t handle numbers larger then 53-bit. These changes required very little code on the mastodon front-end to change, and we don’t expect them to be a big issue conceptually, but you’ll probably want to make sure you’ve got your types in a row before trying to connect to a master instance!

As far as I know there aren’t any plans to make a release with these changes, so you’ll probably have a while to upgrade. I want to make sure everyone is on board before this code makes it into a tagged version.

Thanks! Feel free to chime in here or on the Github thread if you have any questions.

Is the api url version changing with this? for breaking api changes it would make sense to make use of that /vX/ in the api path

I don’t think that really makes sense given that there would be a fundamental correctness issue with trying to use the v1 APIs, also the change is really minor and in non-typed languages would be completely identical.