May 2024 be the year of less `content: JSON.stringify({...})`

```json

{

"kind": 0,

"content": "{\"name\":\"PABLOF7z\",\"picture\":\"\",\"display_name\":\"PABLOF7z\",\"about\":\"Other Stuff maximalist\",\"nip05\":\"_@f7z.io\",\"lud16\":\"pablof7z@ln.tips\",}",

"tags": [

[ "name", "PABLOF7Z" ],

[ "display_name", "PABLOF7Z" ],

[ "picture", ""],

[ "lud16", "pablof7z@ln.tips" ],

[ "nip05", "_@f7z.io" ],

[ "about", "Other Stuff maximalist" ]

]

}

```

Reply to this note

Please Login to reply.

Discussion

Plz

Sorted?

Can I ask a stupid question:

Why are tags a list instead of a dictionary?

Makes it really annoying to parse through. Right now I have to create a for loop to with an if statement since the data is unordered.

Am I missing something?

A dictionary would not allow the same key twice, right? Many events use repeated "keys".

Dang, you’re right! Thanks for clearing that up. So is the best way really to do something like:

for tag in event[1]['tags']:

if tag[0] == 'p':

pubkey_ref = tag[1]

if tag[0] == 'e':

target_eventID = tag[1]

yes, sort of.

kind-1 must not use markdown apparently. I liked it more when markdown was still on the rise in clients. Now your post looks crap on noStrudel and probably other clients, too.