nostrdb: api: add ndb_note_json

add a way to write an ndb note as json to a buffer

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-04-30 23:19:05 +02:00
committed by Daniel D’Aquino
parent ffc50bb2c1
commit 92e1e4b08f
2 changed files with 51 additions and 0 deletions

View File

@@ -532,6 +532,9 @@ void _ndb_note_set_kind(struct ndb_note *note, uint32_t kind);
struct ndb_tags *ndb_note_tags(struct ndb_note *note);
int ndb_str_len(struct ndb_str *str);
/// write the note as json to a buffer
int ndb_note_json(struct ndb_note *, char *buf, int buflen);
// TAGS
void ndb_tags_iterate_start(struct ndb_note *note, struct ndb_iterator *iter);
uint16_t ndb_tags_count(struct ndb_tags *);