Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2577405
json-utils.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
506 B
Referenced Files
None
Subscribers
None
json-utils.hpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include
"libkazv-config.hpp"
#include
<functional>
#include
<nlohmann/json.hpp>
namespace
Kazv
{
template
<
class
Jsonish
,
class
Key
,
class
Func
>
bool
hasAtThat
(
Jsonish
&&
j
,
Key
&&
k
,
Func
&&
f
)
{
return
j
.
contains
(
k
)
&&
std
::
invoke
(
std
::
forward
<
Func
>
(
f
),
std
::
forward
<
Jsonish
>
(
j
)[
std
::
forward
<
Key
>
(
k
)]);
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Jun 24, 6:50 AM (18 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
234735
Default Alt Text
json-utils.hpp (506 B)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment