libzypp
17.38.17
json.cc
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
9
10
#include "
json.h
"
11
#include "
json/private/jsonparser_p.h
"
12
13
namespace
zypp::json
{
14
15
#ifdef ZYPP_DLL
16
zyppng::expected<Value>
parseDocumentExpected(
const
InputStream & input_r )
17
{
18
detail::Parser p;
19
return
p.parse( input_r );
20
}
21
#endif
22
23
Value
parseDocument
(
const
InputStream
& input_r )
24
{
25
// json.cc is always compiled with ZYPP_DLL defined, so
26
// parseDocumentExpected is always available here.
27
return
parseDocumentExpected( input_r ).unwrap();
28
}
29
30
}
// namespace zypp::json
zypp::InputStream
Helper to create and pass std::istream.
Definition:
inputstream.h:56
json.h
Public JSON API.
zyppng::expected
Definition:
expected.h:56
zypp::json::parseDocument
Value parseDocument(const InputStream &input_r)
Parse a JSON document from input_r.
Definition:
json.cc:23
zypp::json::Value
Definition:
JsonValue.h:175
jsonparser_p.h
Internal JSON tokeniser — NOT part of the public API.
zypp::json
Definition:
TargetImpl.cc:152
zypp-core
parser
json.cc
Generated by
1.8.14