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

Order field in m.tag is a float even though Canonical JSON forbids floats #1864

Closed
Johennes opened this issue Jun 12, 2024 · 2 comments
Closed
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@Johennes
Copy link
Contributor

Link to problem area:

https://spec.matrix.org/v1.10/client-server-api/#mtag

Issue

The order field in the content of m.tag is spec'ed as a number between 0 and 1. However, Canonical JSON explicitly forbids floating point numbers.

#615 (comment) mentions "a mess with strings vs. floats in tag orders" but I couldn't find where any place that discusses this further.

@Johennes Johennes added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Jun 12, 2024
@richvdh
Copy link
Member

richvdh commented Jun 12, 2024

The order field in the content of m.tag is spec'ed as a number between 0 and 1. However, Canonical JSON explicitly forbids floating point numbers.

I don't think that matters? m.tag is account data, which is never encoded as Canonical JSON?

@Johennes
Copy link
Contributor Author

Err, yes you're right. My bad, apologies. 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

2 participants