mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
Asai's suggestion of serialization under .content
This commit is contained in:
parent
8a445b8a85
commit
a884973188
14
74.md
14
74.md
|
@ -16,13 +16,19 @@ Various NOSTR client frameworks need efficient mechanisms to display relevant po
|
|||
|
||||
The configuration is defined using a JSON object with the following structure:
|
||||
|
||||
The `.content` of these events should be a JSON-serialized comment of the following structure. It is required but can be an empty string or empty brackets: "{}".
|
||||
|
||||
```json
|
||||
{
|
||||
"kind": 33031,
|
||||
"created_at": 1716994345,
|
||||
"pubkey": "...",
|
||||
"id": "...",
|
||||
"sortingAlgorithmConfig": {
|
||||
"content": "<JSON-serialized-string>"
|
||||
}
|
||||
|
||||
unserialized JSON structure:
|
||||
{
|
||||
"algorithmName": "EnhancedPostSorter",
|
||||
"version": "1.0",
|
||||
"parameters": {
|
||||
|
@ -54,12 +60,14 @@ The configuration is defined using a JSON object with the following structure:
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Fields
|
||||
|
||||
sortingAlgorithmConfig: Root object for the sorting algorithm configuration.
|
||||
content: Root object for the sorting algorithm configuration.
|
||||
algorithmName: Name of the sorting algorithm.
|
||||
version: Version of the sorting algorithm.
|
||||
parameters: Contains sorting and filtering parameters.
|
||||
|
|
Loading…
Reference in New Issue
Block a user