mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 01:30:12 +01:00
ircd::json: Split back into tool.h
This commit is contained in:
parent
c77df219b5
commit
a10992b813
2 changed files with 30 additions and 14 deletions
|
@ -39,20 +39,7 @@ namespace ircd::json
|
|||
#include "strung.h"
|
||||
#include "tuple/tuple.h"
|
||||
#include "stack/stack.h"
|
||||
|
||||
// Convenience toolset for higher level operations.
|
||||
namespace ircd::json
|
||||
{
|
||||
strung append(const array &, const string_view &val);
|
||||
strung prepend(const array &, const string_view &val);
|
||||
|
||||
void merge(stack::object &out, const vector &);
|
||||
strung remove(const object &, const string_view &key);
|
||||
strung remove(const object &, const size_t &index);
|
||||
strung insert(const object &, const member &);
|
||||
strung replace(const object &, const member &);
|
||||
strung replace(const object &, const members &);
|
||||
}
|
||||
#include "tool.h"
|
||||
|
||||
// Exports to ircd::
|
||||
namespace ircd
|
||||
|
|
29
include/ircd/json/tool.h
Normal file
29
include/ircd/json/tool.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Matrix Construct
|
||||
//
|
||||
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
||||
// Copyright (C) 2016-2023 Jason Volk <jason@zemos.net>
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice is present in all copies. The
|
||||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_JSON_TOOL_H
|
||||
|
||||
// Convenience toolset for higher level operations.
|
||||
namespace ircd::json
|
||||
{
|
||||
strung append(const array &, const string_view &val);
|
||||
strung prepend(const array &, const string_view &val);
|
||||
|
||||
void merge(stack::object &out, const vector &);
|
||||
|
||||
strung remove(const object &, const string_view &key);
|
||||
strung remove(const object &, const size_t &index);
|
||||
|
||||
strung insert(const object &, const member &);
|
||||
|
||||
strung replace(const object &, const members &);
|
||||
strung replace(const object &, const member &);
|
||||
}
|
Loading…
Add table
Reference in a new issue