Asai's suggestion of serialization under .content

This commit is contained in:
louhutchinson 2024-05-29 09:37:45 -07:00 committed by GitHub
parent 8a445b8a85
commit a884973188
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

14
74.md
View File

@ -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.