Fix JSON format (#1896)

This commit is contained in:
Alexander Lopatin 2025-04-29 18:28:46 +03:00 committed by GitHub
parent 77fdeeb6f1
commit 85f3282e46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 27 deletions

46
22.md
View File

@ -18,9 +18,9 @@ and `p` for the author of the parent item.
```jsonc ```jsonc
{ {
kind: 1111, "kind": 1111,
content: '<comment>', "content": "<comment>",
tags: [ "tags": [
// root scope: event addresses, event ids, or I-tags. // root scope: event addresses, event ids, or I-tags.
["<A, E, I>", "<address, id or I-value>", "<relay or web page hint>", "<root event's pubkey, if an E tag>"], ["<A, E, I>", "<address, id or I-value>", "<relay or web page hint>", "<root event's pubkey, if an E tag>"],
// the root item kind // the root item kind
@ -64,9 +64,9 @@ A comment on a blog post looks like this:
```jsonc ```jsonc
{ {
kind: 1111, "kind": 1111,
content: 'Great blog post!', "content": "Great blog post!",
tags: [ "tags": [
// top-level comments scope to event addresses or ids // top-level comments scope to event addresses or ids
["A", "30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7", "wss://example.relay"], ["A", "30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7", "wss://example.relay"],
// the root kind // the root kind
@ -91,9 +91,9 @@ A comment on a [NIP-94](94.md) file looks like this:
```jsonc ```jsonc
{ {
kind: 1111, "kind": 1111,
content: 'Great file!', "content": "Great file!",
tags: [ "tags": [
// top-level comments have the same scope and reply to addresses or ids // top-level comments have the same scope and reply to addresses or ids
["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"], ["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"],
// the root kind // the root kind
@ -115,9 +115,9 @@ A reply to a comment looks like this:
```jsonc ```jsonc
{ {
kind: 1111, "kind": 1111,
content: 'This is a reply to "Great file!"', "content": "This is a reply to \"Great file!\"",
tags: [ "tags": [
// nip-94 file event id // nip-94 file event id
["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "fd913cd6fa9edb8405750cd02a8bbe16e158b8676c0e69fdc27436cc4a54cc9a"], ["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "fd913cd6fa9edb8405750cd02a8bbe16e158b8676c0e69fdc27436cc4a54cc9a"],
// the root kind // the root kind
@ -138,9 +138,9 @@ A comment on a website's url looks like this:
```jsonc ```jsonc
{ {
kind: 1111, "kind": 1111,
content: 'Nice article!', "content": "Nice article!",
tags: [ "tags": [
// referencing the root url // referencing the root url
["I", "https://abc.com/articles/1"], ["I", "https://abc.com/articles/1"],
// the root "kind": for an url, the kind is its domain // the root "kind": for an url, the kind is its domain
@ -159,11 +159,11 @@ A podcast comment example:
```jsonc ```jsonc
{ {
id: "80c48d992a38f9c445b943a9c9f1010b396676013443765750431a9004bdac05", "id": "80c48d992a38f9c445b943a9c9f1010b396676013443765750431a9004bdac05",
pubkey: "252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111", "pubkey": "252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111",
kind: 1111, "kind": 1111,
content: "This was a great episode!", "content": "This was a great episode!",
tags: [ "tags": [
// podcast episode reference // podcast episode reference
["I", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f", "https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg"], ["I", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f", "https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg"],
// podcast episode type // podcast episode type
@ -181,9 +181,9 @@ A reply to a podcast comment:
```jsonc ```jsonc
{ {
kind: 1111, "kind": 1111,
content: "I'm replying to the above comment.", "content": "I'm replying to the above comment.",
tags: [ "tags": [
// podcast episode reference // podcast episode reference
["I", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f", "https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg"], ["I", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f", "https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg"],
// podcast episode type // podcast episode type

8
61.md
View File

@ -46,10 +46,10 @@ Clients MUST prefix the public key they P2PK-lock with `"02"` (for nostr<>cashu
```jsonc ```jsonc
{ {
kind: 9321, "kind": 9321,
content: "Thanks for this great idea.", "content": "Thanks for this great idea.",
pubkey: "<sender-pubkey>", "pubkey": "<sender-pubkey>",
tags: [ "tags": [
[ "proof", "{\"amount\":1,\"C\":\"02277c66191736eb72fce9d975d08e3191f8f96afb73ab1eec37e4465683066d3f\",\"id\":\"000a93d6f8a1d2c4\",\"secret\":\"[\\\"P2PK\\\",{\\\"nonce\\\":\\\"b00bdd0467b0090a25bdf2d2f0d45ac4e355c482c1418350f273a04fedaaee83\\\",\\\"data\\\":\\\"02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed\\\"}]\"}" ], [ "proof", "{\"amount\":1,\"C\":\"02277c66191736eb72fce9d975d08e3191f8f96afb73ab1eec37e4465683066d3f\",\"id\":\"000a93d6f8a1d2c4\",\"secret\":\"[\\\"P2PK\\\",{\\\"nonce\\\":\\\"b00bdd0467b0090a25bdf2d2f0d45ac4e355c482c1418350f273a04fedaaee83\\\",\\\"data\\\":\\\"02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed\\\"}]\"}" ],
[ "u", "https://stablenut.umint.cash" ], [ "u", "https://stablenut.umint.cash" ],
[ "e", "<nutzapped-event-id>", "<relay-hint>" ], [ "e", "<nutzapped-event-id>", "<relay-hint>" ],