#include <folly/json/json.h>
#include <algorithm>
#include <functional>
#include <iterator>
#include <sstream>
#include <type_traits>
#include <boost/algorithm/string.hpp>
#include <glog/logging.h>
#include <folly/Conv.h>
#include <folly/Portability.h>
#include <folly/Range.h>
#include <folly/Unicode.h>
#include <folly/Utility.h>
#include <folly/lang/Bits.h>
#include <folly/portability/Constexpr.h>
namespace folly {
namespace json {
namespace {
parse_error make_parse_error(
unsigned int line,
std::string const& context,
std::string const& expected) { … }
struct Printer { … };
struct Input { … };
class RecursionGuard { … };
dynamic parseValue(Input& in, json::metadata_map* map);
std::string parseString(Input& in);
dynamic parseNumber(Input& in);
void parseObjectKeyValue(
Input& in,
dynamic& ret,
dynamic&& key,
json::metadata_map* map,
bool distinct) { … }
dynamic parseObject(Input& in, json::metadata_map* map) { … }
dynamic parseArray(Input& in, json::metadata_map* map) { … }
dynamic parseNumber(Input& in) { … }
void decodeUnicodeEscape(Input& in, std::string& out) { … }
std::string parseString(Input& in) { … }
dynamic parseValue(Input& in, json::metadata_map* map) { … }
}
std::array<uint64_t, 2> buildExtraAsciiToEscapeBitmap(StringPiece chars) { … }
std::string serialize(dynamic const& dyn, serialization_opts const& opts) { … }
template <bool EnableExtraAsciiEscapes, class T>
size_t firstEscapableInWord(T s, const serialization_opts& opts) { … }
template <bool EnableExtraAsciiEscapes>
void escapeStringImpl(
StringPiece input, std::string& out, const serialization_opts& opts) { … }
void escapeString(
StringPiece input, std::string& out, const serialization_opts& opts) { … }
std::string stripComments(StringPiece jsonC) { … }
}
dynamic parseJsonWithMetadata(StringPiece range, json::metadata_map* map) { … }
dynamic parseJsonWithMetadata(
StringPiece range,
json::serialization_opts const& opts,
json::metadata_map* map) { … }
dynamic parseJson(StringPiece range) { … }
dynamic parseJson(StringPiece range, json::serialization_opts const& opts) { … }
std::string toJson(dynamic const& dyn) { … }
std::string toPrettyJson(dynamic const& dyn) { … }
void dynamic::print_as_pseudo_json(std::ostream& out) const { … }
void PrintTo(const dynamic& dyn, std::ostream* os) { … }
}