--- /dev/null
+#include <matrix.h>\r
+#include <mjson.h>\r
+#include <olm/sas.h>\r
+\r
+#include <stdio.h>\r
+\r
+int\r
+main(void)\r
+{\r
+ const char json[] =\r
+ "{"\r
+ "\"method\":\"m.sas.v1\","\r
+ "\"from_device\":\"ULZZOKJBYN\","\r
+ "\"key_agreement_protocols\":[\"curve25519-hkdf-sha256\",\"curve25519\"],"\r
+ "\"hashes\":[\"sha256\"],"\r
+ "\"message_authentication_codes\":[\"hkdf-hmac-sha256.v2\",\"org.matrix.msc3783.hkdf-hmac-sha256\",\"hkdf-hmac-sha256\",\"hmac-sha256\"],"\r
+ "\"short_authentication_string\":[\"decimal\",\"emoji\"],"\r
+ "\"transaction_id\":\"CmMReoy5AK59qd7pa6EO7ocbFwX03isB\""\r
+ "}";\r
+ \r
+ char canonical[1024];\r
+\r
+ JsonCanonicalize(json, strlen(json), canonical, 1024);\r
+\r
+ printf("%s\n", canonical);\r
+\r
+ return 0;\r
+}\r