| /freebsd/crypto/openssl/ssl/quic/ |
| H A D | json_enc.c | 116 static int json_ensure_stack_size(OSSL_JSON_ENC *json, size_t num_bytes) in json_ensure_stack_size() argument 120 if (json->stack_bytes >= num_bytes) in json_ensure_stack_size() 123 if (num_bytes <= OSSL_NELEM(json->stack_small)) { in json_ensure_stack_size() 124 stack = json->stack_small; in json_ensure_stack_size() 126 if (json->stack == json->stack_small) in json_ensure_stack_size() 127 json->stack = NULL; in json_ensure_stack_size() 129 stack = OPENSSL_realloc(json->stack, num_bytes); in json_ensure_stack_size() 134 json->stack = stack; in json_ensure_stack_size() 135 json->stack_bytes = num_bytes; in json_ensure_stack_size() 140 static int json_push(OSSL_JSON_ENC *json, unsigned int v) in json_push() argument [all …]
|
| H A D | qlog.c | 42 OSSL_JSON_ENC json; member 86 if (!ossl_json_init(&qlog->json, NULL, in ossl_qlog_new() 166 ossl_json_flush_cleanup(&qlog->json); in ossl_qlog_free() 187 ossl_json_set0_sink(&qlog->json, bio); in ossl_qlog_set_sink_bio() 242 return ossl_json_flush(&qlog->json); in ossl_qlog_flush() 272 ossl_json_key(&qlog->json, key); in write_str_once() 273 ossl_json_str(&qlog->json, *p); in write_str_once() 284 ossl_json_object_begin(&qlog->json); in qlog_event_seq_header() 286 ossl_json_key(&qlog->json, "qlog_version"); in qlog_event_seq_header() 287 ossl_json_str(&qlog->json, "0.3"); in qlog_event_seq_header() [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Plugins/Protocol/MCP/ |
| H A D | Protocol.h | 30 std::optional<llvm::json::Value> params; 33 llvm::json::Value toJSON(const Request &); 34 bool fromJSON(const llvm::json::Value &, Request &, llvm::json::Path); 42 llvm::json::Value toJSON(const ErrorInfo &); 43 bool fromJSON(const llvm::json::Value &, ErrorInfo &, llvm::json::Path); 50 llvm::json::Value toJSON(const Error &); 51 bool fromJSON(const llvm::json::Value &, Error &, llvm::json::Path); 55 std::optional<llvm::json::Value> result; 59 llvm::json::Value toJSON(const Response &); 60 bool fromJSON(const llvm::json::Value &, Response &, llvm::json::Path); [all …]
|
| H A D | Protocol.cpp | 16 static bool mapRaw(const json::Value &Params, StringLiteral Prop, in mapRaw() 17 std::optional<json::Value> &V, json::Path P) { in mapRaw() 23 const json::Value *E = O->get(Prop); in mapRaw() 29 llvm::json::Value toJSON(const Request &R) { in toJSON() 30 json::Object Result{{"jsonrpc", "2.0"}, {"id", R.id}, {"method", R.method}}; in toJSON() 36 bool fromJSON(const llvm::json::Value &V, Request &R, llvm::json::Path P) { in fromJSON() 37 llvm::json::ObjectMapper O(V, P); in fromJSON() 43 llvm::json::Value toJSON(const ErrorInfo &EI) { in toJSON() 44 llvm::json::Object Result{{"code", EI.code}, {"message", EI.message}}; in toJSON() 50 bool fromJSON(const llvm::json::Value &V, ErrorInfo &EI, llvm::json::Path P) { in fromJSON() [all …]
|
| H A D | Tool.cpp | 23 bool fromJSON(const llvm::json::Value &V, CommandToolArguments &A, in fromJSON() 24 llvm::json::Path P) { in fromJSON() 25 llvm::json::ObjectMapper O(V, P); in fromJSON() 50 if (std::optional<llvm::json::Value> input_schema = GetSchema()) in GetDefinition() 58 if (!std::holds_alternative<json::Value>(args)) in Call() 61 json::Path::Root root; in Call() 64 if (!fromJSON(std::get<json::Value>(args), arguments, root)) in Call() 93 std::optional<llvm::json::Value> CommandTool::GetSchema() const { in GetSchema() 94 llvm::json::Object id_type{{"type", "number"}}; in GetSchema() 95 llvm::json::Object str_type{{"type", "string"}}; in GetSchema() [all …]
|
| /freebsd/crypto/openssl/include/internal/ |
| H A D | json_enc.h | 70 int ossl_json_init(OSSL_JSON_ENC *json, BIO *bio, uint32_t flags); 78 void ossl_json_cleanup(OSSL_JSON_ENC *json); 96 int ossl_json_reset(OSSL_JSON_ENC *json); 107 int ossl_json_flush(OSSL_JSON_ENC *json); 117 int ossl_json_flush_cleanup(OSSL_JSON_ENC *json); 125 int ossl_json_set0_sink(OSSL_JSON_ENC *json, BIO *bio); 147 int ossl_json_in_error(OSSL_JSON_ENC *json); 176 void ossl_json_object_begin(OSSL_JSON_ENC *json); 179 void ossl_json_object_end(OSSL_JSON_ENC *json); 182 void ossl_json_array_begin(OSSL_JSON_ENC *json); [all …]
|
| /freebsd/contrib/llvm-project/lldb/include/lldb/Utility/ |
| H A D | TraceGDBRemotePackets.h | 35 bool fromJSON(const llvm::json::Value &value, TraceSupportedResponse &info, 36 llvm::json::Path path); 38 llvm::json::Value toJSON(const TraceSupportedResponse &packet); 56 bool fromJSON(const llvm::json::Value &value, TraceStartRequest &packet, 57 llvm::json::Path path); 59 llvm::json::Value toJSON(const TraceStartRequest &packet); 80 bool fromJSON(const llvm::json::Value &value, TraceStopRequest &packet, 81 llvm::json::Path path); 83 llvm::json::Value toJSON(const TraceStopRequest &packet); 93 bool fromJSON(const llvm::json::Value &value, TraceGetStateRequest &packet, [all …]
|
| H A D | TraceIntelPTGDBRemotePackets.h | 61 bool fromJSON(const llvm::json::Value &value, TraceIntelPTStartRequest &packet, 62 llvm::json::Path path); 64 llvm::json::Value toJSON(const TraceIntelPTStartRequest &packet); 76 llvm::json::Value toJSON(const JSONUINT64 &uint64, bool hex); 78 bool fromJSON(const llvm::json::Value &value, JSONUINT64 &uint64, 79 llvm::json::Path path); 118 bool fromJSON(const llvm::json::Value &value, 119 LinuxPerfZeroTscConversion &packet, llvm::json::Path path); 121 llvm::json::Value toJSON(const LinuxPerfZeroTscConversion &packet); 123 bool fromJSON(const llvm::json::Value &value, [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Basic/ |
| H A D | Sarif.cpp | 143 static json::Object createMessage(StringRef Text) { in createMessage() 144 return json::Object{{"text", Text.str()}}; in createMessage() 149 static json::Object createTextRegion(const SourceManager &SM, in createTextRegion() 153 json::Object Region{{"startLine", BeginCharLoc.getExpansionLineNumber()}, in createTextRegion() 165 static json::Object createLocation(json::Object &&PhysicalLocation, in createLocation() 167 json::Object Ret{{"physicalLocation", std::move(PhysicalLocation)}}; in createLocation() 200 static json::Object 201 createThreadFlowLocation(json::Object &&Location, in createThreadFlowLocation() 203 return json::Object{{"location", std::move(Location)}, in createThreadFlowLocation() 208 json::Object [all …]
|
| /freebsd/contrib/llvm-project/llvm/tools/llvm-cov/ |
| H A D | CoverageExporterJson.cpp | 83 json::Array renderSegment(const coverage::CoverageSegment &Segment) { in renderSegment() 84 return json::Array({Segment.Line, Segment.Col, in renderSegment() 89 json::Array renderRegion(const coverage::CountedRegion &Region) { in renderRegion() 90 return json::Array({Region.LineStart, Region.ColumnStart, Region.LineEnd, in renderRegion() 96 json::Array renderBranch(const coverage::CountedRegion &Region) { in renderBranch() 97 return json::Array( in renderBranch() 104 json::Array gatherConditions(const coverage::MCDCRecord &Record) { in gatherConditions() 105 json::Array Conditions; in gatherConditions() 111 json::Array renderMCDCRecord(const coverage::MCDCRecord &Record) { in renderMCDCRecord() 114 return json::Array({CMR.LineStart, CMR.ColumnStart, CMR.LineEnd, in renderMCDCRecord() [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Utility/ |
| H A D | TraceGDBRemotePackets.cpp | 12 using namespace llvm::json; 17 bool fromJSON(const json::Value &value, TraceSupportedResponse &packet, in fromJSON() 24 json::Value toJSON(const TraceSupportedResponse &packet) { in toJSON() 25 return json::Value( in toJSON() 34 bool fromJSON(const json::Value &value, TraceStartRequest &packet, Path path) { in fromJSON() 39 json::Value toJSON(const TraceStartRequest &packet) { in toJSON() 40 return json::Value(Object{{"tids", packet.tids}, {"type", packet.type}}); in toJSON() 56 bool fromJSON(const json::Value &value, TraceStopRequest &packet, Path path) { in fromJSON() 61 json::Value toJSON(const TraceStopRequest &packet) { in toJSON() 62 return json::Value(Object{{"type", packet.type}, {"tids", packet.tids}}); in toJSON() [all …]
|
| H A D | TraceIntelPTGDBRemotePackets.cpp | 12 using namespace llvm::json; 25 json::Value toJSON(const JSONUINT64 &uint64, bool hex) { in toJSON() 27 return json::Value(formatv("{0:x+}", uint64.value)); in toJSON() 29 return json::Value(formatv("{0}", uint64.value)); in toJSON() 32 bool fromJSON(const json::Value &value, JSONUINT64 &uint64, Path path) { in fromJSON() 45 bool fromJSON(const json::Value &value, TraceIntelPTStartRequest &packet, in fromJSON() 63 json::Value toJSON(const TraceIntelPTStartRequest &packet) { in toJSON() 64 json::Value base = toJSON((const TraceStartRequest &)packet); in toJSON() 65 json::Object &obj = *base.getAsObject(); in toJSON() 89 json::Value toJSON(const LinuxPerfZeroTscConversion &packet) { in toJSON() [all …]
|
| H A D | StructuredData.cpp | 21 static StructuredData::ObjectSP ParseJSONValue(json::Value &value); 22 static StructuredData::ObjectSP ParseJSONObject(json::Object *object); 23 static StructuredData::ObjectSP ParseJSONArray(json::Array *array); 26 llvm::Expected<json::Value> value = json::parse(json_text); in ParseJSON() 45 llvm::Expected<json::Value> value = in ParseJSONFromFile() 46 json::parse(buffer_or_error.get()->getBuffer().str()); in ParseJSONFromFile() 58 static StructuredData::ObjectSP ParseJSONValue(json::Value &value) { in ParseJSONValue() 59 if (json::Object *O = value.getAsObject()) in ParseJSONValue() 62 if (json::Array *A = value.getAsArray()) in ParseJSONValue() 86 static StructuredData::ObjectSP ParseJSONObject(json::Object *object) { in ParseJSONObject() [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Plugins/Trace/intel-pt/ |
| H A D | TraceIntelPTJSONStructs.h | 63 llvm::json::Value toJSON(const JSONModule &module); 65 llvm::json::Value toJSON(const JSONThread &thread); 67 llvm::json::Value toJSON(const JSONProcess &process); 69 llvm::json::Value toJSON(const JSONCpu &cpu); 71 llvm::json::Value toJSON(const pt_cpu &cpu_info); 73 llvm::json::Value toJSON(const JSONKernel &kernel); 75 llvm::json::Value toJSON(const JSONTraceBundleDescription &bundle_description); 77 bool fromJSON(const llvm::json::Value &value, JSONModule &module, 78 llvm::json::Path path); 80 bool fromJSON(const llvm::json::Value &value, JSONThread &thread, [all …]
|
| H A D | TraceIntelPTJSONStructs.cpp | 18 using namespace llvm::json; 33 json::Value toJSON(const JSONModule &module) { in toJSON() 34 json::Object json_module; in toJSON() 44 bool fromJSON(const json::Value &value, JSONModule &module, Path path) { in fromJSON() 52 json::Value toJSON(const JSONThread &thread) { in toJSON() 53 json::Object obj{{"tid", thread.tid}}; in toJSON() 59 bool fromJSON(const json::Value &value, JSONThread &thread, Path path) { in fromJSON() 64 json::Value toJSON(const JSONProcess &process) { in toJSON() 73 bool fromJSON(const json::Value &value, JSONProcess &process, Path path) { in fromJSON() 79 json::Value toJSON(const JSONCpu &cpu) { in toJSON() [all …]
|
| /freebsd/contrib/wpa/src/utils/ |
| H A D | json.h | 36 void json_free(struct json_token *json); 37 struct json_token * json_get_member(struct json_token *json, const char *name); 38 struct wpabuf * json_get_member_base64url(struct json_token *json, 40 struct wpabuf * json_get_member_base64(struct json_token *json, 43 void json_add_int(struct wpabuf *json, const char *name, int val); 44 void json_add_string(struct wpabuf *json, const char *name, const char *val); 45 int json_add_string_escape(struct wpabuf *json, const char *name, 47 int json_add_base64url(struct wpabuf *json, const char *name, const void *val, 49 int json_add_base64(struct wpabuf *json, const char *name, const void *val, 51 void json_start_object(struct wpabuf *json, const char *name); [all …]
|
| H A D | json.c | 481 void json_free(struct json_token *json) in json_free() argument 483 if (!json) in json_free() 485 json_free(json->child); in json_free() 486 json_free(json->sibling); in json_free() 487 os_free(json->name); in json_free() 488 os_free(json->string); in json_free() 489 os_free(json); in json_free() 493 struct json_token * json_get_member(struct json_token *json, const char *name) in json_get_member() argument 497 if (!json || json->type != JSON_OBJECT) in json_get_member() 500 for (token = json->child; token; token = token->sibling) { in json_get_member() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/TableGen/ |
| H A D | JSONBackend.cpp | 30 json::Value translateInit(const Init &I); 40 json::Value JSONEmitter::translateInit(const Init &I) { in translateInit() 49 json::Array Array; in translateInit() 59 json::Array Array; in translateInit() 70 json::Object Obj; in translateInit() 96 json::Array Args; in translateInit() 98 json::Array Arg; in translateInit() 119 json::Object Root; in run() 129 std::map<std::string, json::Array> InstanceLists; in run() 131 InstanceLists.emplace(ClassRec->getNameInitAsString(), json::Array()); in run() [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Plugins/ObjectFile/JSON/ |
| H A D | ObjectFileJSON.cpp | 65 Expected<json::Value> json = json::parse(text); in CreateInstance() local 66 if (!json) { in CreateInstance() 67 LLDB_LOG_ERROR(log, json.takeError(), in CreateInstance() 72 json::Path::Root root; in CreateInstance() 74 if (!fromJSON(*json, header, root)) { in CreateInstance() 86 if (!fromJSON(*json, body, root)) { in CreateInstance() 123 Expected<json::Value> json = json::parse(text); in GetModuleSpecifications() local 124 if (!json) { in GetModuleSpecifications() 125 LLDB_LOG_ERROR(log, json.takeError(), in GetModuleSpecifications() 130 json::Path::Root root; in GetModuleSpecifications() [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Target/ |
| H A D | Statistics.cpp | 26 static void EmplaceSafeString(llvm::json::Object &obj, llvm::StringRef key, in EmplaceSafeString() 30 if (LLVM_LIKELY(llvm::json::isUTF8(str))) in EmplaceSafeString() 33 obj.try_emplace(key, llvm::json::fixUTF8(str)); in EmplaceSafeString() 36 json::Value StatsSuccessFail::ToJSON() const { in ToJSON() 37 return json::Object{{"successes", successes}, {"failures", failures}}; in ToJSON() 52 json::Value ModuleStats::ToJSON() const { in ToJSON() 53 json::Object module; in ToJSON() 80 json::Object obj; in ToJSON() 90 json::Array symfile_ids; in ToJSON() 97 json::Array type_systems; in ToJSON() [all …]
|
| /freebsd/contrib/llvm-project/llvm/tools/llvm-mca/ |
| H A D | PipelinePrinter.cpp | 32 json::Object PipelinePrinter::getJSONReportRegion() const { in getJSONReportRegion() 33 json::Object JO; in getJSONReportRegion() 47 json::Object PipelinePrinter::getJSONSimulationParameters() const { in getJSONSimulationParameters() 48 json::Object SimParameters({{"-mcpu", STI.getCPU()}, in getJSONSimulationParameters() 80 json::Object PipelinePrinter::getJSONTargetInfo() const { in getJSONTargetInfo() 81 json::Array Resources; in getJSONTargetInfo() 102 return json::Object({{"CPUName", MCPU}, {"Resources", std::move(Resources)}}); in getJSONTargetInfo() 105 void PipelinePrinter::printReport(json::Object &JO) const { in printReport() 110 JO.try_emplace("CodeRegions", json::Array()); in printReport() 113 json::Array *Regions = JO.getArray("CodeRegions"); in printReport()
|
| /freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/ |
| H A D | tst.usdt.d | 39 /json(this->j, "finished") == NULL && json(this->j, "action") != "ignore"/ 41 this->index = strtoll(json(this->j, "index")); 42 this->size = json(this->j, "sizes[2]"); 43 this->odd = json(this->j, "facts.odd"); 44 this->even = json(this->j, "facts.even"); 50 /json(this->j, "finished") != NULL/
|
| /freebsd/contrib/llvm-project/llvm/lib/Support/ |
| H A D | JSON.cpp | 22 namespace json { namespace 67 const json::Object *Object::getObject(StringRef K) const { in getObject() 72 json::Object *Object::getObject(StringRef K) { in getObject() 77 const json::Array *Object::getArray(StringRef K) const { in getArray() 82 json::Array *Object::getArray(StringRef K) { in getArray() 107 : Value(json::Array(Elements)) {} in Value() 126 create<json::Object>(M.as<json::Object>()); in copyFrom() 129 create<json::Array>(M.as<json::Array>()); in copyFrom() 152 create<json::Object>(std::move(M.as<json::Object>())); in moveFrom() 156 create<json::Array>(std::move(M.as<json::Array>())); in moveFrom() [all …]
|
| H A D | Mustache.cpp | 20 static bool isFalsey(const json::Value &V) { in isFalsey() 25 static bool isContextFalsey(const json::Value *V) { in isContextFalsey() 160 void render(const llvm::json::Value &Data, llvm::raw_ostream &OS); 163 void renderLambdas(const llvm::json::Value &Contexts, llvm::raw_ostream &OS, 166 void renderSectionLambdas(const llvm::json::Value &Contexts, 169 void renderPartial(const llvm::json::Value &Contexts, llvm::raw_ostream &OS, 172 void renderChild(const llvm::json::Value &Context, llvm::raw_ostream &OS); 174 const llvm::json::Value *findContext(); 188 const llvm::json::Value *ParentContext; 537 void toMustacheString(const json::Value &Data, raw_ostream &OS) { in toMustacheString() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/DebugInfo/Symbolize/ |
| H A D | DIPrinter.cpp | 292 static json::Object toJSON(const Request &Request, StringRef ErrorMsg = "") { in toJSON() 293 json::Object Json({{"ModuleName", Request.ModuleName.str()}}); in toJSON() 299 Json["Error"] = json::Object({{"Message", ErrorMsg.str()}}); in toJSON() 303 static json::Object toJSON(const DILineInfo &LineInfo) { in toJSON() 304 json::Object Obj = json::Object( in toJSON() 331 json::Array Array; in print() 334 json::Object Object = toJSON(LineInfo); in print() 344 json::Object Json = toJSON(Request); in print() 353 json::Object Data( in print() 357 json::Object Json = toJSON(Request); in print() [all …]
|