LLVM 20.0.0git
|
The root is the trivial Path to the root value. More...
#include "llvm/Support/JSON.h"
Public Member Functions | |
Root (llvm::StringRef Name="") | |
Root (Root &&)=delete | |
Root & | operator= (Root &&)=delete |
Root (const Root &)=delete | |
Root & | operator= (const Root &)=delete |
Error | getError () const |
Returns the last error reported, or else a generic error. | |
void | printErrorContext (const Value &, llvm::raw_ostream &) const |
Print the root value with the error shown inline as a comment. | |
Friends | |
void | Path::report (llvm::StringLiteral Message) |
The root is the trivial Path to the root value.
It also stores the latest reported error and the path where it occurred.
|
inline |
|
delete |
Error llvm::json::Path::Root::getError | ( | ) | const |
Returns the last error reported, or else a generic error.
Definition at line 226 of file JSON.cpp.
References llvm::createStringError(), llvm::StringRef::empty(), llvm::inconvertibleErrorCode(), OS, and llvm::reverse().
void llvm::json::Path::Root::printErrorContext | ( | const Value & | R, |
llvm::raw_ostream & | OS | ||
) | const |
Print the root value with the error shown inline as a comment.
Unrelated parts of the value are elided for brevity, e.g. { "id": 42, "name": /* expected string */ null, "properties": { ... } }
Definition at line 307 of file JSON.cpp.
References A, llvm::json::abbreviate(), llvm::json::abbreviateChildren(), llvm::json::OStream::array(), llvm::json::OStream::attributeBegin(), llvm::json::OStream::attributeEnd(), llvm::json::OStream::comment(), if(), llvm::json::OStream::object(), OS, and llvm::json::sortedElements().
|
friend |