mirror of
https://gitlab.com/hashborgir/d2tweaks-rnd2k.git
synced 2025-10-13 16:34:22 -05:00
Bag of holding updates
This commit is contained in:
335
vendor/json/doc/Doxyfile
vendored
Normal file
335
vendor/json/doc/Doxyfile
vendored
Normal file
@@ -0,0 +1,335 @@
|
||||
# Doxyfile 1.9.0
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "JSON for Modern C++"
|
||||
PROJECT_NUMBER = 3.9.1
|
||||
PROJECT_BRIEF =
|
||||
PROJECT_LOGO =
|
||||
OUTPUT_DIRECTORY = .
|
||||
CREATE_SUBDIRS = NO
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = NO
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
JAVADOC_BANNER = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
PYTHON_DOCSTRING = YES
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = YES
|
||||
TAB_SIZE = 4
|
||||
ALIASES = "complexity=@par Complexity^^" \
|
||||
"liveexample{2}=@par Example^^ \1 ^^ @includelineno \2.cpp \n Output (play with this example @htmlinclude \2.link):^^ @verbinclude \2.output ^^ The <a href= https://github.com/nlohmann/json/blob/develop/doc/examples/\2.cpp>example code</a> above can be translated with @verbatim g++ -std=c++11 -Isingle_include doc/examples/\2.cpp -o \2 @endverbatim" \
|
||||
"requirement=@par Requirements^^" \
|
||||
"exceptionsafety=@par Exception safety^^" \
|
||||
"iterators=@par Iterator validity^^"
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
EXTENSION_MAPPING =
|
||||
MARKDOWN_SUPPORT = YES
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
AUTOLINK_SUPPORT = NO
|
||||
BUILTIN_STL_SUPPORT = YES
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
GROUP_NESTED_COMPOUNDS = NO
|
||||
SUBGROUPING = YES
|
||||
INLINE_GROUPED_CLASSES = NO
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
NUM_PROC_THREADS = 1
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
EXTRACT_PACKAGE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = YES
|
||||
EXTRACT_ANON_NSPACES = YES
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
SHOW_GROUPED_MEMB_INC = NO
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = YES
|
||||
SORT_MEMBERS_CTORS_1ST = YES
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_FILES = NO
|
||||
SHOW_NAMESPACES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
CITE_BIB_FILES =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../single_include/nlohmann/json.hpp \
|
||||
index.md
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS = nlohmann::detail
|
||||
EXAMPLE_PATH = examples
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH = images
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
USE_MDFILE_AS_MAINPAGE = index.md
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
REFERENCES_LINK_SOURCE = NO
|
||||
SOURCE_TOOLTIPS = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = YES
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_EXTRA_STYLESHEET = css/mylayout.css
|
||||
HTML_EXTRA_FILES =
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
HTML_COLORSTYLE_SAT = 100
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
HTML_TIMESTAMP = YES
|
||||
HTML_DYNAMIC_MENUS = YES
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
HTML_INDEX_NUM_ENTRIES = 100
|
||||
GENERATE_DOCSET = YES
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_BUNDLE_ID = me.nlohmann.json
|
||||
DOCSET_PUBLISHER_ID = me.nlohmann
|
||||
DOCSET_PUBLISHER_NAME = NielsLohmann
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
CHM_INDEX_ENCODING =
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
GENERATE_QHP = NO
|
||||
QCH_FILE =
|
||||
QHP_NAMESPACE = org.doxygen.Project
|
||||
QHP_VIRTUAL_FOLDER = doc
|
||||
QHP_CUST_FILTER_NAME =
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
QHG_LOCATION =
|
||||
GENERATE_ECLIPSEHELP = NO
|
||||
ECLIPSE_DOC_ID = org.doxygen.Project
|
||||
DISABLE_INDEX = NO
|
||||
GENERATE_TREEVIEW = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
TREEVIEW_WIDTH = 250
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
HTML_FORMULA_FORMAT = png
|
||||
FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
FORMULA_MACROFILE =
|
||||
USE_MATHJAX = NO
|
||||
MATHJAX_FORMAT = HTML-CSS
|
||||
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
|
||||
MATHJAX_EXTENSIONS =
|
||||
MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
SERVER_BASED_SEARCH = NO
|
||||
EXTERNAL_SEARCH = NO
|
||||
SEARCHENGINE_URL =
|
||||
SEARCHDATA_FILE = searchdata.xml
|
||||
EXTERNAL_SEARCH_ID =
|
||||
EXTRA_SEARCH_MAPPINGS =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
LATEX_MAKEINDEX_CMD = \makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
LATEX_FOOTER =
|
||||
LATEX_EXTRA_STYLESHEET =
|
||||
LATEX_EXTRA_FILES =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
LATEX_SOURCE_CODE = NO
|
||||
LATEX_BIB_STYLE = plain
|
||||
LATEX_TIMESTAMP = NO
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
RTF_SOURCE_CODE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_SUBDIR =
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = YES
|
||||
XML_OUTPUT = xml
|
||||
XML_PROGRAMLISTING = YES
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_DOCBOOK = NO
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
DOCBOOK_PROGRAMLISTING = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE = html/nlohmann_json.tag
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
EXTERNAL_PAGES = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = NO
|
||||
DIA_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = YES
|
||||
DOT_NUM_THREADS = 0
|
||||
DOT_FONTNAME = Helvetica
|
||||
DOT_FONTSIZE = 10
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = NO
|
||||
COLLABORATION_GRAPH = NO
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = YES
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
DOT_UML_DETAILS = NO
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = NO
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = NO
|
||||
DIRECTORY_GRAPH = NO
|
||||
DOT_IMAGE_FORMAT = svg
|
||||
INTERACTIVE_SVG = YES
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MSCFILE_DIRS =
|
||||
DIAFILE_DIRS =
|
||||
PLANTUML_JAR_PATH =
|
||||
PLANTUML_CFG_FILE =
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
92
vendor/json/doc/Makefile
vendored
Normal file
92
vendor/json/doc/Makefile
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
SRCDIR = ../single_include
|
||||
SED:=$(shell command -v gsed || which sed)
|
||||
|
||||
all: doxygen
|
||||
|
||||
|
||||
##########################################################################
|
||||
# example files
|
||||
##########################################################################
|
||||
|
||||
# where are the example cpp files
|
||||
EXAMPLES = $(wildcard examples/*.cpp)
|
||||
|
||||
# create output from a stand-alone example file
|
||||
%.output: %.cpp
|
||||
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||
./$(<:.cpp=) > $@
|
||||
rm $(<:.cpp=)
|
||||
|
||||
# compare created output with current output of the example files
|
||||
%.test: %.cpp
|
||||
make $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=c++11"
|
||||
./$(<:.cpp=) > $@
|
||||
diff $@ $(<:.cpp=.output)
|
||||
rm $(<:.cpp=) $@
|
||||
|
||||
# create links to try the code online
|
||||
%.link: %.cpp
|
||||
rm -fr tmp
|
||||
mkdir tmp
|
||||
cp -r $(SRCDIR)/nlohmann tmp
|
||||
python2 scripts/send_to_wandbox.py tmp $< > $@.tmp
|
||||
/bin/echo -n "<a target=\"_blank\" href=\"`cat $@.tmp`\"><b>online</b></a>" > $@
|
||||
rm -fr tmp $@.tmp
|
||||
|
||||
# create output from all stand-alone example files
|
||||
create_output: $(EXAMPLES:.cpp=.output)
|
||||
|
||||
create_links: $(EXAMPLES:.cpp=.link)
|
||||
|
||||
# check output of all stand-alone example files
|
||||
check_output: $(EXAMPLES:.cpp=.test)
|
||||
|
||||
|
||||
clean:
|
||||
rm -fr me.nlohmann.json.docset html xml $(EXAMPLES:.cpp=)
|
||||
$(MAKE) clean -C docset
|
||||
$(MAKE) clean -C mkdocs
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Doxygen HTML documentation
|
||||
##########################################################################
|
||||
|
||||
# create Doxygen documentation
|
||||
doxygen: create_output create_links
|
||||
doxygen
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, AllocatorType JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer>@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer >@@g' html/*.html
|
||||
$(SED) -i 's@JSON_HEDLEY_RETURNS_NON_NULL@@g' html/*.html
|
||||
$(SED) -i 's@JSON_HEDLEY_WARN_UNUSED_RESULT@@g' html/*.html
|
||||
|
||||
upload: clean doxygen check_output
|
||||
scripts/git-update-ghpages nlohmann/json html
|
||||
rm -fr html
|
||||
open http://nlohmann.github.io/json/
|
||||
|
||||
|
||||
##########################################################################
|
||||
# docset
|
||||
##########################################################################
|
||||
|
||||
# create docset for Dash
|
||||
docset: create_output
|
||||
cp Doxyfile Doxyfile_docset
|
||||
$(SED) -i 's/DISABLE_INDEX = NO/DISABLE_INDEX = YES/' Doxyfile_docset
|
||||
$(SED) -i 's/SEARCHENGINE = YES/SEARCHENGINE = NO/' Doxyfile_docset
|
||||
$(SED) -i 's@HTML_EXTRA_STYLESHEET = css/mylayout.css@HTML_EXTRA_STYLESHEET = css/mylayout_docset.css@' Doxyfile_docset
|
||||
rm -fr html *.docset
|
||||
doxygen Doxyfile_docset
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, AllocatorType >@@g' html/*.html
|
||||
$(SED) -i 's@< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, AllocatorType >@@g' html/*.html
|
||||
make -C html
|
||||
mv html/*.docset .
|
||||
$(SED) -i 's@<string>doxygen</string>@<string>json</string>@' me.nlohmann.json.docset/Contents/Info.plist
|
||||
rm -fr Doxyfile_docset html
|
BIN
vendor/json/doc/avatars.png
vendored
Normal file
BIN
vendor/json/doc/avatars.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
26
vendor/json/doc/css/mylayout.css
vendored
Normal file
26
vendor/json/doc/css/mylayout.css
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/* hide lengthy template information */
|
||||
.memtemplate, .memTemplParams {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* allow compiler information to wrap */
|
||||
/* https://css-tricks.com/snippets/css/make-pre-text-wrap/ */
|
||||
pre.fragment {
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
td.paramname {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.ok_green {
|
||||
background-color: #89C35C;
|
||||
}
|
||||
|
||||
.nok_throws {
|
||||
background-color: #ffa500;
|
||||
}
|
27
vendor/json/doc/css/mylayout_docset.css
vendored
Normal file
27
vendor/json/doc/css/mylayout_docset.css
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
.memtemplate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.memTemplParams {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navtab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#top, .footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
td.paramname {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.ok_green {
|
||||
background-color: #89C35C;
|
||||
}
|
||||
|
||||
.nok_throws {
|
||||
background-color: #ffa500;
|
||||
}
|
20
vendor/json/doc/docset/Info.plist
vendored
Normal file
20
vendor/json/doc/docset/Info.plist
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>nlohmann_json</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>JSON for Modern C++</string>
|
||||
<key>DocSetPlatformFamily</key>
|
||||
<string>json</string>
|
||||
<key>isDashDocset</key>
|
||||
<true/>
|
||||
<key>dashIndexFilePath</key>
|
||||
<string>index.html</string>
|
||||
<key>DashDocSetFallbackURL</key>
|
||||
<string>https://nlohmann.github.io/json/</string>
|
||||
<key>isJavaScriptEnabled</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
21
vendor/json/doc/docset/Makefile
vendored
Normal file
21
vendor/json/doc/docset/Makefile
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
nlohmann_json.docset: Info.plist docSet.sql
|
||||
$(MAKE) clean
|
||||
mkdir -p nlohmann_json.docset/Contents/Resources/Documents/
|
||||
cp info.plist nlohmann_json.docset/Contents
|
||||
# build and copy documentation
|
||||
$(MAKE) build -C ../mkdocs
|
||||
cp -r ../mkdocs/site/* nlohmann_json.docset/Contents/Resources/Documents
|
||||
# patch CSS to hide navigation items
|
||||
echo "\n\nheader, footer, navi, div.md-sidebar--primary, nav.md-tabs--active, a.md-content__button { display: none; }" >> nlohmann_json.docset/Contents/Resources/Documents/assets/stylesheets/main.b5d04df8.min.css
|
||||
# fix spacing
|
||||
echo "\n\ndiv.md-sidebar div.md-sidebar--secondary, div.md-main__inner { top: 0; margin-top: 0 }" >> nlohmann_json.docset/Contents/Resources/Documents/assets/stylesheets/main.b5d04df8.min.css
|
||||
# remove "JSON for Modern C++" from page titles
|
||||
find nlohmann_json.docset/Contents/Resources/Documents -type f -exec gsed -i 's| - JSON for Modern C++</title>|</title>|' {} +
|
||||
# clean up
|
||||
rm nlohmann_json.docset/Contents/Resources/Documents/hooks.py
|
||||
rm nlohmann_json.docset/Contents/Resources/Documents/sitemap.*
|
||||
# generate index
|
||||
sqlite3 nlohmann_json.docset/Contents/Resources/docSet.dsidx < docSet.sql
|
||||
|
||||
clean:
|
||||
rm -fr nlohmann_json.docset
|
13
vendor/json/doc/docset/README.md
vendored
Normal file
13
vendor/json/doc/docset/README.md
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# docset
|
||||
|
||||
The folder contains the required files to create a [docset](https://kapeli.com/docsets) which can be used in
|
||||
documentation browsers like [Dash](https://kapeli.com/dash), [Velocity](https://velocity.silverlakesoftware.com), or
|
||||
[Zeal](https://zealdocs.org).
|
||||
|
||||
The docset can be created with
|
||||
|
||||
```sh
|
||||
make nlohmann_json.docset
|
||||
```
|
||||
|
||||
The generated folder `nlohmann_json.docset` can then be opened in the documentation browser.
|
140
vendor/json/doc/docset/docSet.sql
vendored
Normal file
140
vendor/json/doc/docset/docSet.sql
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
DROP TABLE IF EXISTS searchIndex;
|
||||
CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);
|
||||
CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path);
|
||||
|
||||
-- API
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('accept', 'Function', 'api/basic_json/accept/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('adl_serializer', 'Class', 'api/adl_serializer/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('array', 'Function', 'api/basic_json/array/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('array_t', 'Type', 'api/basic_json/array_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('at', 'Method', 'api/basic_json/at/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('back', 'Method', 'api/basic_json/back/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json', 'Class', 'api/basic_json/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('basic_json', 'Constructor', 'api/basic_json/basic_json/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('begin', 'Method', 'api/basic_json/begin/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('binary', 'Function', 'api/basic_json/binary/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('binary_t', 'Type', 'api/basic_json/binary_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('boolean_t', 'Type', 'api/basic_json/boolean_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('cbegin', 'Method', 'api/basic_json/cbegin/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('cbor_tag_handler_t', 'Enum', 'api/basic_json/cbor_tag_handler_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('cend', 'Method', 'api/basic_json/cend/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('clear', 'Method', 'api/basic_json/clear/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('contains', 'Method', 'api/basic_json/contains/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('count', 'Method', 'api/basic_json/count/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('crbegin', 'Method', 'api/basic_json/crbegin/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('crend', 'Method', 'api/basic_json/crend/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('diff', 'Function', 'api/basic_json/diff/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('dump', 'Method', 'api/basic_json/dump/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('emplace', 'Method', 'api/basic_json/emplace/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('emplace_back', 'Method', 'api/basic_json/emplace_back/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('empty', 'Method', 'api/basic_json/empty/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('end', 'Method', 'api/basic_json/end/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('erase', 'Method', 'api/basic_json/erase/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('error_handler_t', 'Enum', 'api/basic_json/error_handler_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('exception', 'Class', 'api/basic_json/exception/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('find', 'Method', 'api/basic_json/find/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('flatten', 'Method', 'api/basic_json/flatten/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('from_bson', 'Function', 'api/basic_json/from_bson/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('from_cbor', 'Function', 'api/basic_json/from_cbor/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('from_msgpack', 'Function', 'api/basic_json/from_msgpack/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('from_ubjson', 'Function', 'api/basic_json/from_ubjson/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('front', 'Method', 'api/basic_json/front/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('get', 'Method', 'api/basic_json/get/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('get_allocator', 'Function', 'api/basic_json/get_allocator/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('get_binary', 'Method', 'api/basic_json/get_binary/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('get_ptr', 'Method', 'api/basic_json/get_ptr/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('get_ref', 'Method', 'api/basic_json/get_ref/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('get_to', 'Method', 'api/basic_json/get_to/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('input_format_t', 'Enum', 'api/basic_json/input_format_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('insert', 'Method', 'api/basic_json/insert/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('invalid_iterator', 'Class', 'api/basic_json/invalid_iterator/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_array', 'Method', 'api/basic_json/is_array/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_binary', 'Method', 'api/basic_json/is_binary/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_boolean', 'Method', 'api/basic_json/is_boolean/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_discarded', 'Method', 'api/basic_json/is_discarded/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_null', 'Method', 'api/basic_json/is_null/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_number', 'Method', 'api/basic_json/is_number/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_number_float', 'Method', 'api/basic_json/is_number_float/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_number_integer', 'Method', 'api/basic_json/is_number_integer/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_number_unsigned', 'Method', 'api/basic_json/is_number_unsigned/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_object', 'Method', 'api/basic_json/is_object/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_primitive', 'Method', 'api/basic_json/is_primitive/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_string', 'Method', 'api/basic_json/is_string/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('is_structured', 'Method', 'api/basic_json/is_structured/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('items', 'Method', 'api/basic_json/items/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('json', 'Class', 'api/json/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('json_pointer', 'Class', 'api/json_pointer/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('json_serializer', 'Type', 'api/basic_json/json_serializer/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('max_size', 'Method', 'api/basic_json/max_size/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('merge_patch', 'Method', 'api/basic_json/merge_patch/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('meta', 'Function', 'api/basic_json/meta/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('number_float_t', 'Type', 'api/basic_json/number_float_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('number_integer_t', 'Type', 'api/basic_json/number_integer_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('number_unsigned_t', 'Type', 'api/basic_json/number_unsigned_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('object', 'Function', 'api/basic_json/object/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('object_comparator_t', 'Type', 'api/basic_json/object_comparator_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('object_t', 'Type', 'api/basic_json/object_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator!=', 'Operator', 'api/basic_json/operator_ne/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator+=', 'Operator', 'api/basic_json/operator+=/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator=', 'Operator', 'api/basic_json/operator=/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator==', 'Operator', 'api/basic_json/operator_eq/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator<', 'Operator', 'api/basic_json/operator_lt/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator<=', 'Operator', 'api/basic_json/operator_le/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator>', 'Operator', 'api/basic_json/operator_gt/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator>=', 'Operator', 'api/basic_json/operator_ge/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator[]', 'Operator', 'api/basic_json/operator[]/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator""_json', 'Literal', 'api/basic_json/operator_literal_json/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator""_json_pointer', 'Literal', 'api/basic_json/operator_literal_json_pointer/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator ValueType', 'Operator', 'api/basic_json/operator_ValueType/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('operator value_t', 'Operator', 'api/basic_json/operator_value_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('ordered_json', 'Class', 'api/ordered_json/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('ordered_map', 'Class', 'api/ordered_map/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('out_of_range', 'Class', 'api/basic_json/out_of_range/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('other_error', 'Class', 'api/basic_json/other_error/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('parse', 'Function', 'api/basic_json/parse/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('parse_error', 'Class', 'api/basic_json/parse_error/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('parse_event_t', 'Enum', 'api/basic_json/parse_event_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('parser_callback_t', 'Type', 'api/basic_json/parser_callback_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('patch', 'Method', 'api/basic_json/patch/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('push_back', 'Method', 'api/basic_json/push_back/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('rbegin', 'Method', 'api/basic_json/rbegin/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('rend', 'Method', 'api/basic_json/rend/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('sax_parse', 'Function', 'api/basic_json/sax_parse/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('size', 'Method', 'api/basic_json/size/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('string_t', 'Type', 'api/basic_json/string_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('type', 'Method', 'api/basic_json/type/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('type_error', 'Class', 'api/basic_json/type_error/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('type_name', 'Method', 'api/basic_json/type_name/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('unflatten', 'Method', 'api/basic_json/unflatten/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('update', 'Method', 'api/basic_json/update/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('to_bson', 'Function', 'api/basic_json/to_bson/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('to_cbor', 'Function', 'api/basic_json/to_cbor/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('to_msgpack', 'Function', 'api/basic_json/to_msgpack/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('to_ubjson', 'Function', 'api/basic_json/to_ubjson/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('value', 'Method', 'api/basic_json/value/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('value_t', 'Enum', 'api/basic_json/value_t/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('~basic_json', 'Method', 'api/basic_json/~basic_json/index.html');
|
||||
|
||||
-- Features
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Formats', 'Guide', 'features/binary_formats/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('BSON', 'Guide', 'features/binary_formats/bson/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('CBOR', 'Guide', 'features/binary_formats/cbor/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('MessagePack', 'Guide', 'features/binary_formats/messagepack/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('UBJSON', 'Guide', 'features/binary_formats/ubjson/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('Supported Macros', 'Guide', 'features/macros/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('Binary Values', 'Guide', 'features/binary_values/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('Comments', 'Guide', 'features/comments/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('Iterators', 'Guide', 'features/iterators/index.html');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('Types', 'Guide', 'features/types/index.html');
|
||||
|
||||
-- Macros
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_ASSERT', 'Macro', 'features/macros/index.html#json_assertx');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_CATCH_USER', 'Macro', 'features/macros/index.html#json_catch_userexception');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_NOEXCEPTION', 'Macro', 'features/macros/index.html#json_noexception');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_SKIP_UNSUPPORTED_COMPILER_CHECK', 'Macro', 'features/macros/index.html#json_skip_unsupported_compiler_check');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_THROW_USER', 'Macro', 'features/macros/index.html#json_throw_userexception');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_TRY_USER', 'Macro', 'features/macros/index.html#json_try_user');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('JSON_USE_IMPLICIT_CONVERSIONS', 'Macro', 'features/macros/index.html#json_use_implicit_conversions');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_TYPE_INTRUSIVE', 'Macro', 'features/macros/index.html#nlohmann_define_type_intrusivetype-member');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE', 'Macro', 'features/macros/index.html#nlohmann_define_type_non_intrusivetype-member');
|
||||
INSERT INTO searchIndex(name, type, path) VALUES ('NLOHMANN_JSON_SERIALIZE_ENUM', 'Macro', 'features/macros/index.html#nlohmann_json_serialize_enumtype');
|
39
vendor/json/doc/examples/README.cpp
vendored
Normal file
39
vendor/json/doc/examples/README.cpp
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON object
|
||||
json j =
|
||||
{
|
||||
{"pi", 3.141},
|
||||
{"happy", true},
|
||||
{"name", "Niels"},
|
||||
{"nothing", nullptr},
|
||||
{
|
||||
"answer", {
|
||||
{"everything", 42}
|
||||
}
|
||||
},
|
||||
{"list", {1, 0, 2}},
|
||||
{
|
||||
"object", {
|
||||
{"currency", "USD"},
|
||||
{"value", 42.99}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// add new values
|
||||
j["new"]["key"]["value"] = {"another", "list"};
|
||||
|
||||
// count elements
|
||||
auto s = j.size();
|
||||
j["size"] = s;
|
||||
|
||||
// pretty print with indent of 4 spaces
|
||||
std::cout << std::setw(4) << j << '\n';
|
||||
}
|
1
vendor/json/doc/examples/README.link
vendored
Normal file
1
vendor/json/doc/examples/README.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/UYcLkpu1GaaAO2Cp"><b>online</b></a>
|
27
vendor/json/doc/examples/README.output
vendored
Normal file
27
vendor/json/doc/examples/README.output
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"answer": {
|
||||
"everything": 42
|
||||
},
|
||||
"happy": true,
|
||||
"list": [
|
||||
1,
|
||||
0,
|
||||
2
|
||||
],
|
||||
"name": "Niels",
|
||||
"new": {
|
||||
"key": {
|
||||
"value": [
|
||||
"another",
|
||||
"list"
|
||||
]
|
||||
}
|
||||
},
|
||||
"nothing": null,
|
||||
"object": {
|
||||
"currency": "USD",
|
||||
"value": 42.99
|
||||
},
|
||||
"pi": 3.141,
|
||||
"size": 8
|
||||
}
|
26
vendor/json/doc/examples/accept__string.cpp
vendored
Normal file
26
vendor/json/doc/examples/accept__string.cpp
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// a valid JSON text
|
||||
auto valid_text = R"(
|
||||
{
|
||||
"numbers": [1, 2, 3]
|
||||
}
|
||||
)";
|
||||
|
||||
// an invalid JSON text
|
||||
auto invalid_text = R"(
|
||||
{
|
||||
"strings": ["extra", "comma", ]
|
||||
}
|
||||
)";
|
||||
|
||||
std::cout << std::boolalpha
|
||||
<< json::accept(valid_text) << ' '
|
||||
<< json::accept(invalid_text) << '\n';
|
||||
}
|
1
vendor/json/doc/examples/accept__string.link
vendored
Normal file
1
vendor/json/doc/examples/accept__string.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/r5Tai1spihWHTdFA"><b>online</b></a>
|
1
vendor/json/doc/examples/accept__string.output
vendored
Normal file
1
vendor/json/doc/examples/accept__string.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
true false
|
19
vendor/json/doc/examples/array.cpp
vendored
Normal file
19
vendor/json/doc/examples/array.cpp
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON arrays
|
||||
json j_no_init_list = json::array();
|
||||
json j_empty_init_list = json::array({});
|
||||
json j_nonempty_init_list = json::array({1, 2, 3, 4});
|
||||
json j_list_of_pairs = json::array({ {"one", 1}, {"two", 2} });
|
||||
|
||||
// serialize the JSON arrays
|
||||
std::cout << j_no_init_list << '\n';
|
||||
std::cout << j_empty_init_list << '\n';
|
||||
std::cout << j_nonempty_init_list << '\n';
|
||||
std::cout << j_list_of_pairs << '\n';
|
||||
}
|
1
vendor/json/doc/examples/array.link
vendored
Normal file
1
vendor/json/doc/examples/array.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/Ptk2BoNyGfrZfxRU"><b>online</b></a>
|
4
vendor/json/doc/examples/array.output
vendored
Normal file
4
vendor/json/doc/examples/array.output
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[]
|
||||
[]
|
||||
[1,2,3,4]
|
||||
[["one",1],["two",2]]
|
48
vendor/json/doc/examples/at__object_t_key_type.cpp
vendored
Normal file
48
vendor/json/doc/examples/at__object_t_key_type.cpp
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON object
|
||||
json object =
|
||||
{
|
||||
{"the good", "il buono"},
|
||||
{"the bad", "il cattivo"},
|
||||
{"the ugly", "il brutto"}
|
||||
};
|
||||
|
||||
// output element with key "the ugly"
|
||||
std::cout << object.at("the ugly") << '\n';
|
||||
|
||||
// change element with key "the bad"
|
||||
object.at("the bad") = "il cattivo";
|
||||
|
||||
// output changed array
|
||||
std::cout << object << '\n';
|
||||
|
||||
|
||||
// exception type_error.304
|
||||
try
|
||||
{
|
||||
// use at() on a non-object type
|
||||
json str = "I am a string";
|
||||
str.at("the good") = "Another string";
|
||||
}
|
||||
catch (json::type_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// exception out_of_range.401
|
||||
try
|
||||
{
|
||||
// try to write at a nonexisting key
|
||||
object.at("the fast") = "il rapido";
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/at__object_t_key_type.link
vendored
Normal file
1
vendor/json/doc/examples/at__object_t_key_type.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/055DW3OWJPwGYr92"><b>online</b></a>
|
4
vendor/json/doc/examples/at__object_t_key_type.output
vendored
Normal file
4
vendor/json/doc/examples/at__object_t_key_type.output
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"il brutto"
|
||||
{"the bad":"il cattivo","the good":"il buono","the ugly":"il brutto"}
|
||||
[json.exception.type_error.304] cannot use at() with string
|
||||
[json.exception.out_of_range.403] key 'the fast' not found
|
42
vendor/json/doc/examples/at__object_t_key_type_const.cpp
vendored
Normal file
42
vendor/json/doc/examples/at__object_t_key_type_const.cpp
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON object
|
||||
const json object =
|
||||
{
|
||||
{"the good", "il buono"},
|
||||
{"the bad", "il cattivo"},
|
||||
{"the ugly", "il brutto"}
|
||||
};
|
||||
|
||||
// output element with key "the ugly"
|
||||
std::cout << object.at("the ugly") << '\n';
|
||||
|
||||
|
||||
// exception type_error.304
|
||||
try
|
||||
{
|
||||
// use at() on a non-object type
|
||||
const json str = "I am a string";
|
||||
std::cout << str.at("the good") << '\n';
|
||||
}
|
||||
catch (json::type_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// exception out_of_range.401
|
||||
try
|
||||
{
|
||||
// try to read from a nonexisting key
|
||||
std::cout << object.at("the fast") << '\n';
|
||||
}
|
||||
catch (json::out_of_range)
|
||||
{
|
||||
std::cout << "out of range" << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/at__object_t_key_type_const.link
vendored
Normal file
1
vendor/json/doc/examples/at__object_t_key_type_const.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/gM1uqvzukokLwjMa"><b>online</b></a>
|
3
vendor/json/doc/examples/at__object_t_key_type_const.output
vendored
Normal file
3
vendor/json/doc/examples/at__object_t_key_type_const.output
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"il brutto"
|
||||
[json.exception.type_error.304] cannot use at() with string
|
||||
out of range
|
43
vendor/json/doc/examples/at__size_type.cpp
vendored
Normal file
43
vendor/json/doc/examples/at__size_type.cpp
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON array
|
||||
json array = {"first", "2nd", "third", "fourth"};
|
||||
|
||||
// output element at index 2 (third element)
|
||||
std::cout << array.at(2) << '\n';
|
||||
|
||||
// change element at index 1 (second element) to "second"
|
||||
array.at(1) = "second";
|
||||
|
||||
// output changed array
|
||||
std::cout << array << '\n';
|
||||
|
||||
|
||||
// exception type_error.304
|
||||
try
|
||||
{
|
||||
// use at() on a non-array type
|
||||
json str = "I am a string";
|
||||
str.at(0) = "Another string";
|
||||
}
|
||||
catch (json::type_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// exception out_of_range.401
|
||||
try
|
||||
{
|
||||
// try to write beyond the array limit
|
||||
array.at(5) = "sixth";
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/at__size_type.link
vendored
Normal file
1
vendor/json/doc/examples/at__size_type.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/H3tBOr4lpufGRHlF"><b>online</b></a>
|
4
vendor/json/doc/examples/at__size_type.output
vendored
Normal file
4
vendor/json/doc/examples/at__size_type.output
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
"third"
|
||||
["first","second","third","fourth"]
|
||||
[json.exception.type_error.304] cannot use at() with string
|
||||
[json.exception.out_of_range.401] array index 5 is out of range
|
37
vendor/json/doc/examples/at__size_type_const.cpp
vendored
Normal file
37
vendor/json/doc/examples/at__size_type_const.cpp
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON array
|
||||
const json array = {"first", "2nd", "third", "fourth"};
|
||||
|
||||
// output element at index 2 (third element)
|
||||
std::cout << array.at(2) << '\n';
|
||||
|
||||
|
||||
// exception type_error.304
|
||||
try
|
||||
{
|
||||
// use at() on a non-array type
|
||||
const json str = "I am a string";
|
||||
std::cout << str.at(0) << '\n';
|
||||
}
|
||||
catch (json::type_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// exception out_of_range.401
|
||||
try
|
||||
{
|
||||
// try to read beyond the array limit
|
||||
std::cout << array.at(5) << '\n';
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/at__size_type_const.link
vendored
Normal file
1
vendor/json/doc/examples/at__size_type_const.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/UtGhIQGxCYIml36F"><b>online</b></a>
|
3
vendor/json/doc/examples/at__size_type_const.output
vendored
Normal file
3
vendor/json/doc/examples/at__size_type_const.output
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"third"
|
||||
[json.exception.type_error.304] cannot use at() with string
|
||||
[json.exception.out_of_range.401] array index 5 is out of range
|
103
vendor/json/doc/examples/at_json_pointer.cpp
vendored
Normal file
103
vendor/json/doc/examples/at_json_pointer.cpp
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON value
|
||||
json j =
|
||||
{
|
||||
{"number", 1}, {"string", "foo"}, {"array", {1, 2}}
|
||||
};
|
||||
|
||||
// read-only access
|
||||
|
||||
// output element with JSON pointer "/number"
|
||||
std::cout << j.at("/number"_json_pointer) << '\n';
|
||||
// output element with JSON pointer "/string"
|
||||
std::cout << j.at("/string"_json_pointer) << '\n';
|
||||
// output element with JSON pointer "/array"
|
||||
std::cout << j.at("/array"_json_pointer) << '\n';
|
||||
// output element with JSON pointer "/array/1"
|
||||
std::cout << j.at("/array/1"_json_pointer) << '\n';
|
||||
|
||||
// writing access
|
||||
|
||||
// change the string
|
||||
j.at("/string"_json_pointer) = "bar";
|
||||
// output the changed string
|
||||
std::cout << j["string"] << '\n';
|
||||
|
||||
// change an array element
|
||||
j.at("/array/1"_json_pointer) = 21;
|
||||
// output the changed array
|
||||
std::cout << j["array"] << '\n';
|
||||
|
||||
|
||||
// out_of_range.106
|
||||
try
|
||||
{
|
||||
// try to use an array index with leading '0'
|
||||
json::reference ref = j.at("/array/01"_json_pointer);
|
||||
}
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.109
|
||||
try
|
||||
{
|
||||
// try to use an array index that is not a number
|
||||
json::reference ref = j.at("/array/one"_json_pointer);
|
||||
}
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.401
|
||||
try
|
||||
{
|
||||
// try to use a an invalid array index
|
||||
json::reference ref = j.at("/array/4"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.402
|
||||
try
|
||||
{
|
||||
// try to use the array index '-'
|
||||
json::reference ref = j.at("/array/-"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.403
|
||||
try
|
||||
{
|
||||
// try to use a JSON pointer to an nonexistent object key
|
||||
json::const_reference ref = j.at("/foo"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.404
|
||||
try
|
||||
{
|
||||
// try to use a JSON pointer that cannot be resolved
|
||||
json::reference ref = j.at("/number/foo"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/at_json_pointer.link
vendored
Normal file
1
vendor/json/doc/examples/at_json_pointer.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/NHe5FLR1KYaiHwBx"><b>online</b></a>
|
12
vendor/json/doc/examples/at_json_pointer.output
vendored
Normal file
12
vendor/json/doc/examples/at_json_pointer.output
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
1
|
||||
"foo"
|
||||
[1,2]
|
||||
2
|
||||
"bar"
|
||||
[1,21]
|
||||
[json.exception.parse_error.106] parse error: array index '01' must not begin with '0'
|
||||
[json.exception.parse_error.109] parse error: array index 'one' is not a number
|
||||
[json.exception.out_of_range.401] array index 4 is out of range
|
||||
[json.exception.out_of_range.402] array index '-' (2) is out of range
|
||||
[json.exception.out_of_range.403] key 'foo' not found
|
||||
[json.exception.out_of_range.404] unresolved reference token 'foo'
|
79
vendor/json/doc/examples/at_json_pointer_const.cpp
vendored
Normal file
79
vendor/json/doc/examples/at_json_pointer_const.cpp
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON value
|
||||
const json j =
|
||||
{
|
||||
{"number", 1}, {"string", "foo"}, {"array", {1, 2}}
|
||||
};
|
||||
|
||||
// read-only access
|
||||
|
||||
// output element with JSON pointer "/number"
|
||||
std::cout << j.at("/number"_json_pointer) << '\n';
|
||||
// output element with JSON pointer "/string"
|
||||
std::cout << j.at("/string"_json_pointer) << '\n';
|
||||
// output element with JSON pointer "/array"
|
||||
std::cout << j.at("/array"_json_pointer) << '\n';
|
||||
// output element with JSON pointer "/array/1"
|
||||
std::cout << j.at("/array/1"_json_pointer) << '\n';
|
||||
|
||||
// out_of_range.109
|
||||
try
|
||||
{
|
||||
// try to use an array index that is not a number
|
||||
json::const_reference ref = j.at("/array/one"_json_pointer);
|
||||
}
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.401
|
||||
try
|
||||
{
|
||||
// try to use a an invalid array index
|
||||
json::const_reference ref = j.at("/array/4"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.402
|
||||
try
|
||||
{
|
||||
// try to use the array index '-'
|
||||
json::const_reference ref = j.at("/array/-"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.403
|
||||
try
|
||||
{
|
||||
// try to use a JSON pointer to an nonexistent object key
|
||||
json::const_reference ref = j.at("/foo"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
// out_of_range.404
|
||||
try
|
||||
{
|
||||
// try to use a JSON pointer that cannot be resolved
|
||||
json::const_reference ref = j.at("/number/foo"_json_pointer);
|
||||
}
|
||||
catch (json::out_of_range& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/at_json_pointer_const.link
vendored
Normal file
1
vendor/json/doc/examples/at_json_pointer_const.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/lbZjdwg6yII33cV5"><b>online</b></a>
|
9
vendor/json/doc/examples/at_json_pointer_const.output
vendored
Normal file
9
vendor/json/doc/examples/at_json_pointer_const.output
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
1
|
||||
"foo"
|
||||
[1,2]
|
||||
2
|
||||
[json.exception.parse_error.109] parse error: array index 'one' is not a number
|
||||
[json.exception.out_of_range.401] array index 4 is out of range
|
||||
[json.exception.out_of_range.402] array index '-' (2) is out of range
|
||||
[json.exception.out_of_range.403] key 'foo' not found
|
||||
[json.exception.out_of_range.404] unresolved reference token 'foo'
|
38
vendor/json/doc/examples/back.cpp
vendored
Normal file
38
vendor/json/doc/examples/back.cpp
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON values
|
||||
json j_boolean = true;
|
||||
json j_number_integer = 17;
|
||||
json j_number_float = 23.42;
|
||||
json j_object = {{"one", 1}, {"two", 2}};
|
||||
json j_object_empty(json::value_t::object);
|
||||
json j_array = {1, 2, 4, 8, 16};
|
||||
json j_array_empty(json::value_t::array);
|
||||
json j_string = "Hello, world";
|
||||
|
||||
// call back()
|
||||
std::cout << j_boolean.back() << '\n';
|
||||
std::cout << j_number_integer.back() << '\n';
|
||||
std::cout << j_number_float.back() << '\n';
|
||||
std::cout << j_object.back() << '\n';
|
||||
//std::cout << j_object_empty.back() << '\n'; // undefined behavior
|
||||
std::cout << j_array.back() << '\n';
|
||||
//std::cout << j_array_empty.back() << '\n'; // undefined behavior
|
||||
std::cout << j_string.back() << '\n';
|
||||
|
||||
// back() called on a null value
|
||||
try
|
||||
{
|
||||
json j_null;
|
||||
j_null.back();
|
||||
}
|
||||
catch (json::invalid_iterator& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/back.link
vendored
Normal file
1
vendor/json/doc/examples/back.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/swnzqmd8zj6ij1fb"><b>online</b></a>
|
7
vendor/json/doc/examples/back.output
vendored
Normal file
7
vendor/json/doc/examples/back.output
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
true
|
||||
17
|
||||
23.42
|
||||
2
|
||||
16
|
||||
"Hello, world"
|
||||
[json.exception.invalid_iterator.214] cannot get value
|
218
vendor/json/doc/examples/basic_json__CompatibleType.cpp
vendored
Normal file
218
vendor/json/doc/examples/basic_json__CompatibleType.cpp
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
#include <iostream>
|
||||
#include <deque>
|
||||
#include <list>
|
||||
#include <forward_list>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <valarray>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// ============
|
||||
// object types
|
||||
// ============
|
||||
|
||||
// create an object from an object_t value
|
||||
json::object_t object_value = { {"one", 1}, {"two", 2} };
|
||||
json j_object_t(object_value);
|
||||
|
||||
// create an object from std::map
|
||||
std::map<std::string, int> c_map
|
||||
{
|
||||
{"one", 1}, {"two", 2}, {"three", 3}
|
||||
};
|
||||
json j_map(c_map);
|
||||
|
||||
// create an object from std::unordered_map
|
||||
std::unordered_map<const char*, double> c_umap
|
||||
{
|
||||
{"one", 1.2}, {"two", 2.3}, {"three", 3.4}
|
||||
};
|
||||
json j_umap(c_umap);
|
||||
|
||||
// create an object from std::multimap
|
||||
std::multimap<std::string, bool> c_mmap
|
||||
{
|
||||
{"one", true}, {"two", true}, {"three", false}, {"three", true}
|
||||
};
|
||||
json j_mmap(c_mmap); // only one entry for key "three" is used
|
||||
|
||||
// create an object from std::unordered_multimap
|
||||
std::unordered_multimap<std::string, bool> c_ummap
|
||||
{
|
||||
{"one", true}, {"two", true}, {"three", false}, {"three", true}
|
||||
};
|
||||
json j_ummap(c_ummap); // only one entry for key "three" is used
|
||||
|
||||
// serialize the JSON objects
|
||||
std::cout << j_object_t << '\n';
|
||||
std::cout << j_map << '\n';
|
||||
std::cout << j_umap << '\n';
|
||||
std::cout << j_mmap << '\n';
|
||||
std::cout << j_ummap << "\n\n";
|
||||
|
||||
|
||||
// ===========
|
||||
// array types
|
||||
// ===========
|
||||
|
||||
// create an array from an array_t value
|
||||
json::array_t array_value = {"one", "two", 3, 4.5, false};
|
||||
json j_array_t(array_value);
|
||||
|
||||
// create an array from std::vector
|
||||
std::vector<int> c_vector {1, 2, 3, 4};
|
||||
json j_vec(c_vector);
|
||||
|
||||
// create an array from std::valarray
|
||||
std::valarray<short> c_valarray {10, 9, 8, 7};
|
||||
json j_valarray(c_valarray);
|
||||
|
||||
// create an array from std::deque
|
||||
std::deque<double> c_deque {1.2, 2.3, 3.4, 5.6};
|
||||
json j_deque(c_deque);
|
||||
|
||||
// create an array from std::list
|
||||
std::list<bool> c_list {true, true, false, true};
|
||||
json j_list(c_list);
|
||||
|
||||
// create an array from std::forward_list
|
||||
std::forward_list<int64_t> c_flist {12345678909876, 23456789098765, 34567890987654, 45678909876543};
|
||||
json j_flist(c_flist);
|
||||
|
||||
// create an array from std::array
|
||||
std::array<unsigned long, 4> c_array {{1, 2, 3, 4}};
|
||||
json j_array(c_array);
|
||||
|
||||
// create an array from std::set
|
||||
std::set<std::string> c_set {"one", "two", "three", "four", "one"};
|
||||
json j_set(c_set); // only one entry for "one" is used
|
||||
|
||||
// create an array from std::unordered_set
|
||||
std::unordered_set<std::string> c_uset {"one", "two", "three", "four", "one"};
|
||||
json j_uset(c_uset); // only one entry for "one" is used
|
||||
|
||||
// create an array from std::multiset
|
||||
std::multiset<std::string> c_mset {"one", "two", "one", "four"};
|
||||
json j_mset(c_mset); // both entries for "one" are used
|
||||
|
||||
// create an array from std::unordered_multiset
|
||||
std::unordered_multiset<std::string> c_umset {"one", "two", "one", "four"};
|
||||
json j_umset(c_umset); // both entries for "one" are used
|
||||
|
||||
// serialize the JSON arrays
|
||||
std::cout << j_array_t << '\n';
|
||||
std::cout << j_vec << '\n';
|
||||
std::cout << j_valarray << '\n';
|
||||
std::cout << j_deque << '\n';
|
||||
std::cout << j_list << '\n';
|
||||
std::cout << j_flist << '\n';
|
||||
std::cout << j_array << '\n';
|
||||
std::cout << j_set << '\n';
|
||||
std::cout << j_uset << '\n';
|
||||
std::cout << j_mset << '\n';
|
||||
std::cout << j_umset << "\n\n";
|
||||
|
||||
|
||||
// ============
|
||||
// string types
|
||||
// ============
|
||||
|
||||
// create string from a string_t value
|
||||
json::string_t string_value = "The quick brown fox jumps over the lazy dog.";
|
||||
json j_string_t(string_value);
|
||||
|
||||
// create a JSON string directly from a string literal
|
||||
json j_string_literal("The quick brown fox jumps over the lazy dog.");
|
||||
|
||||
// create string from std::string
|
||||
std::string s_stdstring = "The quick brown fox jumps over the lazy dog.";
|
||||
json j_stdstring(s_stdstring);
|
||||
|
||||
// serialize the JSON strings
|
||||
std::cout << j_string_t << '\n';
|
||||
std::cout << j_string_literal << '\n';
|
||||
std::cout << j_stdstring << "\n\n";
|
||||
|
||||
|
||||
// ============
|
||||
// number types
|
||||
// ============
|
||||
|
||||
// create a JSON number from number_integer_t
|
||||
json::number_integer_t value_integer_t = -42;
|
||||
json j_integer_t(value_integer_t);
|
||||
|
||||
// create a JSON number from number_unsigned_t
|
||||
json::number_integer_t value_unsigned_t = 17;
|
||||
json j_unsigned_t(value_unsigned_t);
|
||||
|
||||
// create a JSON number from an anonymous enum
|
||||
enum { enum_value = 17 };
|
||||
json j_enum(enum_value);
|
||||
|
||||
// create values of different integer types
|
||||
short n_short = 42;
|
||||
int n_int = -23;
|
||||
long n_long = 1024;
|
||||
int_least32_t n_int_least32_t = -17;
|
||||
uint8_t n_uint8_t = 8;
|
||||
|
||||
// create (integer) JSON numbers
|
||||
json j_short(n_short);
|
||||
json j_int(n_int);
|
||||
json j_long(n_long);
|
||||
json j_int_least32_t(n_int_least32_t);
|
||||
json j_uint8_t(n_uint8_t);
|
||||
|
||||
// create values of different floating-point types
|
||||
json::number_float_t v_ok = 3.141592653589793;
|
||||
json::number_float_t v_nan = NAN;
|
||||
json::number_float_t v_infinity = INFINITY;
|
||||
|
||||
// create values of different floating-point types
|
||||
float n_float = 42.23;
|
||||
float n_float_nan = 1.0f / 0.0f;
|
||||
double n_double = 23.42;
|
||||
|
||||
// create (floating point) JSON numbers
|
||||
json j_ok(v_ok);
|
||||
json j_nan(v_nan);
|
||||
json j_infinity(v_infinity);
|
||||
json j_float(n_float);
|
||||
json j_float_nan(n_float_nan);
|
||||
json j_double(n_double);
|
||||
|
||||
// serialize the JSON numbers
|
||||
std::cout << j_integer_t << '\n';
|
||||
std::cout << j_unsigned_t << '\n';
|
||||
std::cout << j_enum << '\n';
|
||||
std::cout << j_short << '\n';
|
||||
std::cout << j_int << '\n';
|
||||
std::cout << j_long << '\n';
|
||||
std::cout << j_int_least32_t << '\n';
|
||||
std::cout << j_uint8_t << '\n';
|
||||
std::cout << j_ok << '\n';
|
||||
std::cout << j_nan << '\n';
|
||||
std::cout << j_infinity << '\n';
|
||||
std::cout << j_float << '\n';
|
||||
std::cout << j_float_nan << '\n';
|
||||
std::cout << j_double << "\n\n";
|
||||
|
||||
|
||||
// =============
|
||||
// boolean types
|
||||
// =============
|
||||
|
||||
// create boolean values
|
||||
json j_truth = true;
|
||||
json j_falsity = false;
|
||||
|
||||
// serialize the JSON booleans
|
||||
std::cout << j_truth << '\n';
|
||||
std::cout << j_falsity << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__CompatibleType.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__CompatibleType.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/RodBcX8vpcP5dQ40"><b>online</b></a>
|
39
vendor/json/doc/examples/basic_json__CompatibleType.output
vendored
Normal file
39
vendor/json/doc/examples/basic_json__CompatibleType.output
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
{"one":1,"two":2}
|
||||
{"one":1,"three":3,"two":2}
|
||||
{"one":1.2,"three":3.4,"two":2.3}
|
||||
{"one":true,"three":false,"two":true}
|
||||
{"one":true,"three":false,"two":true}
|
||||
|
||||
["one","two",3,4.5,false]
|
||||
[1,2,3,4]
|
||||
[10,9,8,7]
|
||||
[1.2,2.3,3.4,5.6]
|
||||
[true,true,false,true]
|
||||
[12345678909876,23456789098765,34567890987654,45678909876543]
|
||||
[1,2,3,4]
|
||||
["four","one","three","two"]
|
||||
["four","three","two","one"]
|
||||
["four","one","one","two"]
|
||||
["four","two","one","one"]
|
||||
|
||||
"The quick brown fox jumps over the lazy dog."
|
||||
"The quick brown fox jumps over the lazy dog."
|
||||
"The quick brown fox jumps over the lazy dog."
|
||||
|
||||
-42
|
||||
17
|
||||
17
|
||||
42
|
||||
-23
|
||||
1024
|
||||
-17
|
||||
8
|
||||
3.141592653589793
|
||||
null
|
||||
null
|
||||
42.22999954223633
|
||||
null
|
||||
23.42
|
||||
|
||||
true
|
||||
false
|
32
vendor/json/doc/examples/basic_json__InputIt_InputIt.cpp
vendored
Normal file
32
vendor/json/doc/examples/basic_json__InputIt_InputIt.cpp
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON values
|
||||
json j_array = {"alpha", "bravo", "charly", "delta", "easy"};
|
||||
json j_number = 42;
|
||||
json j_object = {{"one", "eins"}, {"two", "zwei"}};
|
||||
|
||||
// create copies using iterators
|
||||
json j_array_range(j_array.begin() + 1, j_array.end() - 2);
|
||||
json j_number_range(j_number.begin(), j_number.end());
|
||||
json j_object_range(j_object.begin(), j_object.find("two"));
|
||||
|
||||
// serialize the values
|
||||
std::cout << j_array_range << '\n';
|
||||
std::cout << j_number_range << '\n';
|
||||
std::cout << j_object_range << '\n';
|
||||
|
||||
// example for an exception
|
||||
try
|
||||
{
|
||||
json j_invalid(j_number.begin() + 1, j_number.end());
|
||||
}
|
||||
catch (json::invalid_iterator& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/basic_json__InputIt_InputIt.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__InputIt_InputIt.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/oWFo4AhVlMBjNv8E"><b>online</b></a>
|
4
vendor/json/doc/examples/basic_json__InputIt_InputIt.output
vendored
Normal file
4
vendor/json/doc/examples/basic_json__InputIt_InputIt.output
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
["bravo","charly"]
|
||||
42
|
||||
{"one":"eins"}
|
||||
[json.exception.invalid_iterator.204] iterators out of range
|
17
vendor/json/doc/examples/basic_json__basic_json.cpp
vendored
Normal file
17
vendor/json/doc/examples/basic_json__basic_json.cpp
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON array
|
||||
json j1 = {"one", "two", 3, 4.5, false};
|
||||
|
||||
// create a copy
|
||||
json j2(j1);
|
||||
|
||||
// serialize the JSON array
|
||||
std::cout << j1 << " = " << j2 << '\n';
|
||||
std::cout << std::boolalpha << (j1 == j2) << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__basic_json.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__basic_json.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/oRn0YsYyurs0Zi5T"><b>online</b></a>
|
2
vendor/json/doc/examples/basic_json__basic_json.output
vendored
Normal file
2
vendor/json/doc/examples/basic_json__basic_json.output
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
["one","two",3,4.5,false] = ["one","two",3,4.5,false]
|
||||
true
|
18
vendor/json/doc/examples/basic_json__copyassignment.cpp
vendored
Normal file
18
vendor/json/doc/examples/basic_json__copyassignment.cpp
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON values
|
||||
json a = 23;
|
||||
json b = 42;
|
||||
|
||||
// copy-assign a to b
|
||||
b = a;
|
||||
|
||||
// serialize the JSON arrays
|
||||
std::cout << a << '\n';
|
||||
std::cout << b << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__copyassignment.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__copyassignment.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/kVknQzPMpqjywTpG"><b>online</b></a>
|
2
vendor/json/doc/examples/basic_json__copyassignment.output
vendored
Normal file
2
vendor/json/doc/examples/basic_json__copyassignment.output
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
23
|
||||
23
|
21
vendor/json/doc/examples/basic_json__list_init_t.cpp
vendored
Normal file
21
vendor/json/doc/examples/basic_json__list_init_t.cpp
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON values
|
||||
json j_empty_init_list = json({});
|
||||
json j_object = { {"one", 1}, {"two", 2} };
|
||||
json j_array = {1, 2, 3, 4};
|
||||
json j_nested_object = { {"one", {1}}, {"two", {1, 2}} };
|
||||
json j_nested_array = { {{1}, "one"}, {{1, 2}, "two"} };
|
||||
|
||||
// serialize the JSON value
|
||||
std::cout << j_empty_init_list << '\n';
|
||||
std::cout << j_object << '\n';
|
||||
std::cout << j_array << '\n';
|
||||
std::cout << j_nested_object << '\n';
|
||||
std::cout << j_nested_array << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__list_init_t.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__list_init_t.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/yzkjGGzMOESBkCdH"><b>online</b></a>
|
5
vendor/json/doc/examples/basic_json__list_init_t.output
vendored
Normal file
5
vendor/json/doc/examples/basic_json__list_init_t.output
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{}
|
||||
{"one":1,"two":2}
|
||||
[1,2,3,4]
|
||||
{"one":[1],"two":[1,2]}
|
||||
[[[1],"one"],[[1,2],"two"]]
|
17
vendor/json/doc/examples/basic_json__moveconstructor.cpp
vendored
Normal file
17
vendor/json/doc/examples/basic_json__moveconstructor.cpp
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON value
|
||||
json a = 23;
|
||||
|
||||
// move contents of a to b
|
||||
json b(std::move(a));
|
||||
|
||||
// serialize the JSON arrays
|
||||
std::cout << a << '\n';
|
||||
std::cout << b << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__moveconstructor.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__moveconstructor.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/eIOvQiuID2qgxp5u"><b>online</b></a>
|
2
vendor/json/doc/examples/basic_json__moveconstructor.output
vendored
Normal file
2
vendor/json/doc/examples/basic_json__moveconstructor.output
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
null
|
||||
23
|
16
vendor/json/doc/examples/basic_json__nullptr_t.cpp
vendored
Normal file
16
vendor/json/doc/examples/basic_json__nullptr_t.cpp
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// implicitly create a JSON null value
|
||||
json j1;
|
||||
|
||||
// explicitly create a JSON null value
|
||||
json j2(nullptr);
|
||||
|
||||
// serialize the JSON null value
|
||||
std::cout << j1 << '\n' << j2 << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__nullptr_t.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__nullptr_t.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/Vm0nR32x6co8rq40"><b>online</b></a>
|
2
vendor/json/doc/examples/basic_json__nullptr_t.output
vendored
Normal file
2
vendor/json/doc/examples/basic_json__nullptr_t.output
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
null
|
||||
null
|
18
vendor/json/doc/examples/basic_json__size_type_basic_json.cpp
vendored
Normal file
18
vendor/json/doc/examples/basic_json__size_type_basic_json.cpp
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create an array by creating copies of a JSON value
|
||||
json value = "Hello";
|
||||
json array_0 = json(0, value);
|
||||
json array_1 = json(1, value);
|
||||
json array_5 = json(5, value);
|
||||
|
||||
// serialize the JSON arrays
|
||||
std::cout << array_0 << '\n';
|
||||
std::cout << array_1 << '\n';
|
||||
std::cout << array_5 << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__size_type_basic_json.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__size_type_basic_json.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/w4TtEQzlVyokIrtp"><b>online</b></a>
|
3
vendor/json/doc/examples/basic_json__size_type_basic_json.output
vendored
Normal file
3
vendor/json/doc/examples/basic_json__size_type_basic_json.output
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[]
|
||||
["Hello"]
|
||||
["Hello","Hello","Hello","Hello","Hello"]
|
30
vendor/json/doc/examples/basic_json__value.cpp
vendored
Normal file
30
vendor/json/doc/examples/basic_json__value.cpp
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON object with different entry types
|
||||
json j =
|
||||
{
|
||||
{"integer", 1},
|
||||
{"floating", 42.23},
|
||||
{"string", "hello world"},
|
||||
{"boolean", true},
|
||||
{"object", {{"key1", 1}, {"key2", 2}}},
|
||||
{"array", {1, 2, 3}}
|
||||
};
|
||||
|
||||
// access existing values
|
||||
int v_integer = j.value("integer", 0);
|
||||
double v_floating = j.value("floating", 47.11);
|
||||
|
||||
// access nonexisting values and rely on default value
|
||||
std::string v_string = j.value("nonexisting", "oops");
|
||||
bool v_boolean = j.value("nonexisting", false);
|
||||
|
||||
// output values
|
||||
std::cout << std::boolalpha << v_integer << " " << v_floating
|
||||
<< " " << v_string << " " << v_boolean << "\n";
|
||||
}
|
1
vendor/json/doc/examples/basic_json__value.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__value.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/mNy1nyabOkeHfHGf"><b>online</b></a>
|
1
vendor/json/doc/examples/basic_json__value.output
vendored
Normal file
1
vendor/json/doc/examples/basic_json__value.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1 42.23 oops false
|
30
vendor/json/doc/examples/basic_json__value_ptr.cpp
vendored
Normal file
30
vendor/json/doc/examples/basic_json__value_ptr.cpp
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON object with different entry types
|
||||
json j =
|
||||
{
|
||||
{"integer", 1},
|
||||
{"floating", 42.23},
|
||||
{"string", "hello world"},
|
||||
{"boolean", true},
|
||||
{"object", {{"key1", 1}, {"key2", 2}}},
|
||||
{"array", {1, 2, 3}}
|
||||
};
|
||||
|
||||
// access existing values
|
||||
int v_integer = j.value("/integer"_json_pointer, 0);
|
||||
double v_floating = j.value("/floating"_json_pointer, 47.11);
|
||||
|
||||
// access nonexisting values and rely on default value
|
||||
std::string v_string = j.value("/nonexisting"_json_pointer, "oops");
|
||||
bool v_boolean = j.value("/nonexisting"_json_pointer, false);
|
||||
|
||||
// output values
|
||||
std::cout << std::boolalpha << v_integer << " " << v_floating
|
||||
<< " " << v_string << " " << v_boolean << "\n";
|
||||
}
|
1
vendor/json/doc/examples/basic_json__value_ptr.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__value_ptr.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/a3H6kpORXgbVXylv"><b>online</b></a>
|
1
vendor/json/doc/examples/basic_json__value_ptr.output
vendored
Normal file
1
vendor/json/doc/examples/basic_json__value_ptr.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1 42.23 oops false
|
25
vendor/json/doc/examples/basic_json__value_t.cpp
vendored
Normal file
25
vendor/json/doc/examples/basic_json__value_t.cpp
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create the different JSON values with default values
|
||||
json j_null(json::value_t::null);
|
||||
json j_boolean(json::value_t::boolean);
|
||||
json j_number_integer(json::value_t::number_integer);
|
||||
json j_number_float(json::value_t::number_float);
|
||||
json j_object(json::value_t::object);
|
||||
json j_array(json::value_t::array);
|
||||
json j_string(json::value_t::string);
|
||||
|
||||
// serialize the JSON values
|
||||
std::cout << j_null << '\n';
|
||||
std::cout << j_boolean << '\n';
|
||||
std::cout << j_number_integer << '\n';
|
||||
std::cout << j_number_float << '\n';
|
||||
std::cout << j_object << '\n';
|
||||
std::cout << j_array << '\n';
|
||||
std::cout << j_string << '\n';
|
||||
}
|
1
vendor/json/doc/examples/basic_json__value_t.link
vendored
Normal file
1
vendor/json/doc/examples/basic_json__value_t.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/yXZGDwDHH3LOuFIr"><b>online</b></a>
|
7
vendor/json/doc/examples/basic_json__value_t.output
vendored
Normal file
7
vendor/json/doc/examples/basic_json__value_t.output
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
null
|
||||
false
|
||||
0
|
||||
0.0
|
||||
{}
|
||||
[]
|
||||
""
|
16
vendor/json/doc/examples/begin.cpp
vendored
Normal file
16
vendor/json/doc/examples/begin.cpp
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create an array value
|
||||
json array = {1, 2, 3, 4, 5};
|
||||
|
||||
// get an iterator to the first element
|
||||
json::iterator it = array.begin();
|
||||
|
||||
// serialize the element that the iterator points to
|
||||
std::cout << *it << '\n';
|
||||
}
|
1
vendor/json/doc/examples/begin.link
vendored
Normal file
1
vendor/json/doc/examples/begin.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/fS4kfQG1hmhjMScn"><b>online</b></a>
|
1
vendor/json/doc/examples/begin.output
vendored
Normal file
1
vendor/json/doc/examples/begin.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1
|
16
vendor/json/doc/examples/cbegin.cpp
vendored
Normal file
16
vendor/json/doc/examples/cbegin.cpp
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create an array value
|
||||
const json array = {1, 2, 3, 4, 5};
|
||||
|
||||
// get an iterator to the first element
|
||||
json::const_iterator it = array.cbegin();
|
||||
|
||||
// serialize the element that the iterator points to
|
||||
std::cout << *it << '\n';
|
||||
}
|
1
vendor/json/doc/examples/cbegin.link
vendored
Normal file
1
vendor/json/doc/examples/cbegin.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/hxcSxCPPLHpZMxjS"><b>online</b></a>
|
1
vendor/json/doc/examples/cbegin.output
vendored
Normal file
1
vendor/json/doc/examples/cbegin.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1
|
19
vendor/json/doc/examples/cend.cpp
vendored
Normal file
19
vendor/json/doc/examples/cend.cpp
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create an array value
|
||||
json array = {1, 2, 3, 4, 5};
|
||||
|
||||
// get an iterator to one past the last element
|
||||
json::const_iterator it = array.cend();
|
||||
|
||||
// decrement the iterator to point to the last element
|
||||
--it;
|
||||
|
||||
// serialize the element that the iterator points to
|
||||
std::cout << *it << '\n';
|
||||
}
|
1
vendor/json/doc/examples/cend.link
vendored
Normal file
1
vendor/json/doc/examples/cend.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/xbnldrrN05tKIOEv"><b>online</b></a>
|
1
vendor/json/doc/examples/cend.output
vendored
Normal file
1
vendor/json/doc/examples/cend.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
5
|
34
vendor/json/doc/examples/clear.cpp
vendored
Normal file
34
vendor/json/doc/examples/clear.cpp
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create JSON values
|
||||
json j_null;
|
||||
json j_boolean = true;
|
||||
json j_number_integer = 17;
|
||||
json j_number_float = 23.42;
|
||||
json j_object = {{"one", 1}, {"two", 2}};
|
||||
json j_array = {1, 2, 4, 8, 16};
|
||||
json j_string = "Hello, world";
|
||||
|
||||
// call clear()
|
||||
j_null.clear();
|
||||
j_boolean.clear();
|
||||
j_number_integer.clear();
|
||||
j_number_float.clear();
|
||||
j_object.clear();
|
||||
j_array.clear();
|
||||
j_string.clear();
|
||||
|
||||
// serialize the cleared values()
|
||||
std::cout << j_null << '\n';
|
||||
std::cout << j_boolean << '\n';
|
||||
std::cout << j_number_integer << '\n';
|
||||
std::cout << j_number_float << '\n';
|
||||
std::cout << j_object << '\n';
|
||||
std::cout << j_array << '\n';
|
||||
std::cout << j_string << '\n';
|
||||
}
|
1
vendor/json/doc/examples/clear.link
vendored
Normal file
1
vendor/json/doc/examples/clear.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/gDQPYFxMrvD7RK4z"><b>online</b></a>
|
7
vendor/json/doc/examples/clear.output
vendored
Normal file
7
vendor/json/doc/examples/clear.output
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
null
|
||||
false
|
||||
0
|
||||
0.0
|
||||
{}
|
||||
[]
|
||||
""
|
17
vendor/json/doc/examples/contains.cpp
vendored
Normal file
17
vendor/json/doc/examples/contains.cpp
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create some JSON values
|
||||
json j_object = R"( {"key": "value"} )"_json;
|
||||
json j_array = R"( [1, 2, 3] )"_json;
|
||||
|
||||
// call contains
|
||||
std::cout << std::boolalpha <<
|
||||
"j_object contains 'key': " << j_object.contains("key") << '\n' <<
|
||||
"j_object contains 'another': " << j_object.contains("another") << '\n' <<
|
||||
"j_array contains 'key': " << j_array.contains("key") << std::endl;
|
||||
}
|
1
vendor/json/doc/examples/contains.link
vendored
Normal file
1
vendor/json/doc/examples/contains.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/vVY4F4xKC3v6pG6F"><b>online</b></a>
|
3
vendor/json/doc/examples/contains.output
vendored
Normal file
3
vendor/json/doc/examples/contains.output
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
j_object contains 'key': true
|
||||
j_object contains 'another': false
|
||||
j_array contains 'key': false
|
42
vendor/json/doc/examples/contains_json_pointer.cpp
vendored
Normal file
42
vendor/json/doc/examples/contains_json_pointer.cpp
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON value
|
||||
json j =
|
||||
{
|
||||
{"number", 1}, {"string", "foo"}, {"array", {1, 2}}
|
||||
};
|
||||
|
||||
std::cout << std::boolalpha
|
||||
<< j.contains("/number"_json_pointer) << '\n'
|
||||
<< j.contains("/string"_json_pointer) << '\n'
|
||||
<< j.contains("/array"_json_pointer) << '\n'
|
||||
<< j.contains("/array/1"_json_pointer) << '\n'
|
||||
<< j.contains("/array/-"_json_pointer) << '\n'
|
||||
<< j.contains("/array/4"_json_pointer) << '\n'
|
||||
<< j.contains("/baz"_json_pointer) << std::endl;
|
||||
|
||||
try
|
||||
{
|
||||
// try to use an array index with leading '0'
|
||||
j.contains("/array/01"_json_pointer);
|
||||
}
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// try to use an array index that is not a number
|
||||
j.contains("/array/one"_json_pointer);
|
||||
}
|
||||
catch (json::parse_error& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
1
vendor/json/doc/examples/contains_json_pointer.link
vendored
Normal file
1
vendor/json/doc/examples/contains_json_pointer.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/Q2GTzxF8NA10kVvD"><b>online</b></a>
|
7
vendor/json/doc/examples/contains_json_pointer.output
vendored
Normal file
7
vendor/json/doc/examples/contains_json_pointer.output
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
true
|
||||
true
|
||||
true
|
||||
true
|
||||
false
|
||||
false
|
||||
false
|
18
vendor/json/doc/examples/count.cpp
vendored
Normal file
18
vendor/json/doc/examples/count.cpp
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create a JSON object
|
||||
json j_object = {{"one", 1}, {"two", 2}};
|
||||
|
||||
// call count()
|
||||
auto count_two = j_object.count("two");
|
||||
auto count_three = j_object.count("three");
|
||||
|
||||
// print values
|
||||
std::cout << "number of elements with key \"two\": " << count_two << '\n';
|
||||
std::cout << "number of elements with key \"three\": " << count_three << '\n';
|
||||
}
|
1
vendor/json/doc/examples/count.link
vendored
Normal file
1
vendor/json/doc/examples/count.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/6LRjg1bqwchPUoDx"><b>online</b></a>
|
2
vendor/json/doc/examples/count.output
vendored
Normal file
2
vendor/json/doc/examples/count.output
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
number of elements with key "two": 1
|
||||
number of elements with key "three": 0
|
16
vendor/json/doc/examples/crbegin.cpp
vendored
Normal file
16
vendor/json/doc/examples/crbegin.cpp
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create an array value
|
||||
json array = {1, 2, 3, 4, 5};
|
||||
|
||||
// get an iterator to the reverse-beginning
|
||||
json::const_reverse_iterator it = array.crbegin();
|
||||
|
||||
// serialize the element that the iterator points to
|
||||
std::cout << *it << '\n';
|
||||
}
|
1
vendor/json/doc/examples/crbegin.link
vendored
Normal file
1
vendor/json/doc/examples/crbegin.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/JMDd9jiP0flRKJ6C"><b>online</b></a>
|
1
vendor/json/doc/examples/crbegin.output
vendored
Normal file
1
vendor/json/doc/examples/crbegin.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
5
|
19
vendor/json/doc/examples/crend.cpp
vendored
Normal file
19
vendor/json/doc/examples/crend.cpp
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
// create an array value
|
||||
json array = {1, 2, 3, 4, 5};
|
||||
|
||||
// get an iterator to the reverse-end
|
||||
json::const_reverse_iterator it = array.crend();
|
||||
|
||||
// increment the iterator to point to the first element
|
||||
--it;
|
||||
|
||||
// serialize the element that the iterator points to
|
||||
std::cout << *it << '\n';
|
||||
}
|
1
vendor/json/doc/examples/crend.link
vendored
Normal file
1
vendor/json/doc/examples/crend.link
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a target="_blank" href="https://wandbox.org/permlink/HdlqwPk8bDfrZ4AE"><b>online</b></a>
|
1
vendor/json/doc/examples/crend.output
vendored
Normal file
1
vendor/json/doc/examples/crend.output
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1
|
22
vendor/json/doc/examples/diagnostics_extended.cpp
vendored
Normal file
22
vendor/json/doc/examples/diagnostics_extended.cpp
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <iostream>
|
||||
|
||||
# define JSON_DIAGNOSTICS 1
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main()
|
||||
{
|
||||
json j;
|
||||
j["address"]["street"] = "Fake Street";
|
||||
j["address"]["housenumber"] = "12";
|
||||
|
||||
try
|
||||
{
|
||||
int housenumber = j["address"]["housenumber"];
|
||||
}
|
||||
catch (json::exception& e)
|
||||
{
|
||||
std::cout << e.what() << '\n';
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user