mcpp index

compat.yyjson

#include

Fastest C JSON library with SIMD — ANSI C, zero dependencies

#include "yyjson.h"
mcpp add compat.yyjson@0.12.0

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// Smoke test — verify compat.yyjson builds, links, and works
#include "yyjson.h"
import std;

int main() {
    const char* json = R"({"name":"mcpp","version":"0.12.0"})";
    yyjson_doc* doc = yyjson_read(json, strlen(json), 0);
    if (!doc) return 1;
    auto* root = yyjson_doc_get_root(doc);
    auto* name = yyjson_obj_get(root, "name");
    if (!name || std::string_view{yyjson_get_str(name)} != "mcpp") return 2;
    std::println("compat.yyjson smoke test: ok");
    yyjson_doc_free(doc);
    return 0;
}

tests/examples/yyjson/tests/parse.cpp · 项目 tests/examples/yyjson

构建

targets
yyjson (lib)
language
c++23
C standard
c99
import std
no
include dirs
*/src

源文件 (1)

  • */src/yyjson.c

版本

版本平台 镜像sha256
0.12.0 最新 LinuxWindowsmacOS 源站 b16246f617b2…