proxygen
|
Classes | |
struct | serialization_opts |
Functions | |
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) |
std::array< uint64_t, 2 > folly::json::buildExtraAsciiToEscapeBitmap | ( | StringPiece | chars | ) |
void folly::json::escapeString | ( | StringPiece | input, |
std::string & | out, | ||
const serialization_opts & | opts | ||
) |
Definition at line 824 of file json.cpp.
References folly::json::serialization_opts::extra_ascii_to_escape_bitmap, and FOLLY_UNLIKELY.
void folly::json::escapeStringImpl | ( | StringPiece | input, |
std::string & | out, | ||
const serialization_opts & | opts | ||
) |
Definition at line 688 of file json.cpp.
References folly::Range< Iter >::begin(), c, folly::json::serialization_opts::encode_non_ascii, folly::Range< Iter >::end(), folly::json::serialization_opts::extra_ascii_to_escape_bitmap, prefix(), folly::json::serialization_opts::skip_invalid_utf8, uint64_t, uint8_t, folly::utf8ToCodePoint(), v, and folly::json::serialization_opts::validate_utf8.
size_t folly::json::firstEscapableInWord | ( | T | s, |
const serialization_opts & | opts | ||
) |
Definition at line 633 of file json.cpp.
References b, c, folly::json::serialization_opts::extra_ascii_to_escape_bitmap, folly::findFirstSet(), folly::findLastSet(), i, folly::kIsLittleEndian, folly::T, uint64_t, uint8_t, and value.
std::string folly::json::serialize | ( | dynamic const & | dyn, |
serialization_opts const & | opts | ||
) |
Definition at line 621 of file json.cpp.
References folly::json::serialization_opts::pretty_formatting, and string.
Referenced by BENCHMARK(), wangle::FilePersistenceLayer< K, V >::persist(), folly::dynamic::print_as_pseudo_json(), folly::PrintTo(), TEST(), folly::toJson(), folly::toPrettyJson(), ClientSerializeHandler::write(), and ServerSerializeHandler::write().
std::string folly::json::stripComments | ( | StringPiece | jsonC | ) |
Definition at line 837 of file json.cpp.
References i, s, folly::Range< Iter >::size(), string, folly::Range< Iter >::subpiece(), and UNLIKELY.
Referenced by folly::parseLogConfigJson(), and TEST().