myself on Nostr: It's not that strict. It only says that the encoding is UTF-8 and that there ...
It's not that strict. It only says that the encoding is UTF-8 and that there shouldn't be white spaces or line breaks. I have seen different implementations serializing the same object differently for example when you use stranger characters like emojis. So here when you calculate the event ID/signature you have to pay attention on how the rest of the clients will serialize your object so that their calculations will match yours.
Published at
2023-03-10 13:18:26Event JSON
{
"id": "fd380ed715ccfd5de1bfd3bc514300bc3df889b22359dfc73f89a80bad323bb6",
"pubkey": "67ddca50751581c703c174790588c2cd8b00f80313d0f80a5b9e73d45e48ac20",
"created_at": 1678454306,
"kind": 1,
"tags": [
[
"e",
"49c73c74eb537436ffab8128e6b1a1243de442f87f06fbe8dc32eee6687c4887",
"wss://relay.snort.social",
"root"
],
[
"e",
"f90425c553ccbd16bddfd26d82411175917b3a8d5af6c229f02c06f7acbb8909",
"wss://relay.snort.social",
"reply"
],
[
"p",
"67ddca50751581c703c174790588c2cd8b00f80313d0f80a5b9e73d45e48ac20"
],
[
"p",
"b2dd40097e4d04b1a56fb3b65fc1d1aaf2929ad30fd842c74d68b9908744495b"
]
],
"content": "It's not that strict. It only says that the encoding is UTF-8 and that there shouldn't be white spaces or line breaks. I have seen different implementations serializing the same object differently for example when you use stranger characters like emojis. So here when you calculate the event ID/signature you have to pay attention on how the rest of the clients will serialize your object so that their calculations will match yours.",
"sig": "5b3a5617df15e1014f17c34d8beccf259a7546cb986e0eef19f5cdb009b0cce5dedd28fae9a53d3e327bf538adc59a513a07ff7f0e6dadf89a7df37de8f3bf7d"
}