-
Notifications
You must be signed in to change notification settings - Fork 0
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
LEXICOGRAPHICAL property order is under-specified #81
Comments
@cyberphone Commented public class Dog {
@JsonbProperty("\u0080")
public String name;
@JsonbProperty("\ufb33")
public int age;
@JsonbProperty("\ud83d\ude02")
public long ijsonlong;
@JsonbProperty("\u00f6")
public boolean bitable;
} Serializes as: The Hebrew letter property comes out a bit strange in HTML... |
@cyberphone Commented Current standard for signed JSON:
JSON clear text signature alternatives depend on canonicalization: {
"id": "johndoe",
"counter": 3,
"list": [
"yes",
"no"
],
"signature": {
"alg": "HS256",
"kid": "mykey",
"val": "rlKLoCBExrwB7NaChPtQ3cAxr83eGdpLA7txrg49slw"
}
} End of Base64 tyranny 😂!!! |
@rmannibucau Commented |
@m0mus Commented |
@rmannibucau Commented |
@cyberphone Commented |
|
Or to be more correct; if the lexicographical sorting order is going to be of any utility* it could benefit by a more detailed definition. Here is an attempt creating such:
https://cyberphone.github.io/doc/security/draft-rundgren-json-canonicalization-scheme.html#json.sorting.properties
In my Java-based JSON tools I use
which complies with the specification above. Presumably your RI does that as well, right?
*) It is not very clear what the purpose is with this mode. ECMAScript has an entirely different default property ordering mode which is based on the fairly simple idea that declaration/parsing order has a meaning which makes sense for objects like:
Using lexicographical ordering it would be serialized in the order "address", "city", "name", "state" and "zip", which adds fuzziness to the data from a human (developer or technical support), perspective.
The text was updated successfully, but these errors were encountered: