LLVM: llvm::json Namespace Reference (original) (raw)
| Classes | |
|---|---|
| class | Array |
| An Array is a JSON array, which contains heterogeneous JSON values. More... | |
| class | Object |
| An Object is a JSON object, which maps strings to heterogenous JSON values. More... | |
| class | ObjectKey |
| ObjectKey is a used to capture keys in Object. More... | |
| class | ObjectMapper |
| Helper for mapping JSON objects onto protocol structs. More... | |
| class | OStream |
| json::OStream allows writing well-formed JSON without materializing all structures as json::Value ahead of time. More... | |
| class | ParseError |
| class | Path |
| A "cursor" marking a position within a Value. More... | |
| class | Value |
| A Value is an JSON value of unknown type. More... |
| Variables | |
|---|---|
| template<typename T> | |
| constexpr bool | is_uint_64_bit_v |
◆ abbreviate()
◆ abbreviateChildren()
◆ encodeUtf8()
| void llvm::json::encodeUtf8 ( uint32_t Rune, std::string & Out ) | static |
|---|
◆ fixUTF8()
Replaces invalid UTF-8 sequences in S with the replacement character (U+FFFD).
The returned string is valid UTF-8. This is much slower than isUTF8, so test that first.
Definition at line 700 of file JSON.cpp.
References llvm::ConvertUTF32toUTF8(), llvm::ConvertUTF8toUTF32(), llvm::StringRef::data(), llvm::lenientConversion, llvm::StringRef::size(), and llvm::strictConversion.
Referenced by abbreviate(), llvm::json::OStream::attributeBegin(), llvm::json::ObjectKey::ObjectKey(), llvm::json::ObjectKey::ObjectKey(), llvm::json::Value::Value(), and llvm::json::Value::Value().
◆ fromJSON() [1/12]
◆ fromJSON() [2/12]
◆ fromJSON() [3/12]
◆ fromJSON() [4/12]
◆ fromJSON() [5/12]
◆ fromJSON() [6/12]
template<typename T>
| bool llvm::json::fromJSON | ( | const Value & | E, |
|---|---|---|---|
| std::map< std::string, T > & | Out, | ||
| Path | P ) |
◆ fromJSON() [7/12]
◆ fromJSON() [8/12]
template<typename T>
| bool llvm::json::fromJSON | ( | const Value & | E, |
|---|---|---|---|
| std::optional< T > & | Out, | ||
| Path | P ) |
◆ fromJSON() [9/12]
◆ fromJSON() [10/12]
◆ fromJSON() [11/12]
◆ fromJSON() [12/12]
◆ isUTF8()
Returns true if S is valid UTF-8, which is required for use as JSON.
If it returns false, Offset is set to a byte offset near the first error.
Definition at line 686 of file JSON.cpp.
References llvm::Data, llvm::StringRef::data(), llvm::isASCII(), llvm::isLegalUTF8String(), LLVM_LIKELY, and llvm::StringRef::size().
Referenced by llvm::json::OStream::attributeBegin(), llvm::json::ObjectKey::ObjectKey(), llvm::json::ObjectKey::ObjectKey(), llvm::json::Value::Value(), and llvm::json::Value::Value().
◆ operator!=() [1/4]
◆ operator!=() [2/4]
◆ operator!=() [3/4]
◆ operator!=() [4/4]
◆ operator<()
◆ operator<<()
◆ operator==() [1/4]
◆ operator==() [2/4]
◆ operator==() [3/4]
◆ operator==() [4/4]
◆ parse() [1/2]
Version of parse() that converts the parsed value to the type T.
RootName describes the root object and is used in error messages.
Definition at line 935 of file JSON.h.
References fromJSON(), parse(), and T.
◆ parse() [2/2]
◆ quote()
◆ sortedElements()
◆ toJSON()
template<typename T>
| Value llvm::json::toJSON | ( | const std::optional< T > & | Opt | ) |
|---|
◆ is_uint_64_bit_v
template<typename T>
| bool llvm::json::is_uint_64_bit_v | constexpr |
|---|
Initial value:
=
std::is_integral_v && std::is_unsigned_v &&