in my Nostr indexer, i generally just store events verbatim, but i make an exception for the "content" field. my code always attempts to parse it as JSON and if it succeeds, it stores it as an object in MongoDB. this is because the "content" field sometimes contains JSON even though it's not officially supposed to. the NIPs don't mention where relay lists are usually stored, but it's in the NIP-02 contact list events, in the content field, encoded as JSON. in case anything else is also stored as JSON in that field, i just try to decode JSON for it no matter what kind of message it is.
Discussion
No replies yet.