mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -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 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
|
```json
|
||||||
{
|
{
|
||||||
"kind": 33031,
|
"kind": 33031,
|
||||||
"created_at": 1716994345,
|
"created_at": 1716994345,
|
||||||
"pubkey": "...",
|
"pubkey": "...",
|
||||||
"id": "...",
|
"id": "...",
|
||||||
"sortingAlgorithmConfig": {
|
"content": "<JSON-serialized-string>"
|
||||||
|
}
|
||||||
|
|
||||||
|
unserialized JSON structure:
|
||||||
|
{
|
||||||
"algorithmName": "EnhancedPostSorter",
|
"algorithmName": "EnhancedPostSorter",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"parameters": {
|
"parameters": {
|
||||||
|
@ -54,12 +60,14 @@ The configuration is defined using a JSON object with the following structure:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Fields
|
## Fields
|
||||||
|
|
||||||
sortingAlgorithmConfig: Root object for the sorting algorithm configuration.
|
content: Root object for the sorting algorithm configuration.
|
||||||
algorithmName: Name of the sorting algorithm.
|
algorithmName: Name of the sorting algorithm.
|
||||||
version: Version of the sorting algorithm.
|
version: Version of the sorting algorithm.
|
||||||
parameters: Contains sorting and filtering parameters.
|
parameters: Contains sorting and filtering parameters.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user