资源加载中... loading...

C++ Library

  • https://nlohmann.github.io/json/
    void main() {
        json table = R"({"type": "table", "title": "Position Information", "cols": ["Column1", "Column2"], "rows": [["abc", "def"], ["ABC", "support color #ff0000"]]})"_json;
        LogStatus("`" + table.dump() + "`");
        LogStatus("Fist line message\n`" + table.dump() + "`\nThird line message");
        json arr = R"([])"_json;
        arr.push_back(table);
        arr.push_back(table);
        LogStatus("`" + arr.dump() + "`");
        
        table = R"({
            "type" : "table", 
            "title" : "Position Operation", 
            "cols" : ["Column1", "Column2", "Action"], 
            "rows" : [
                ["abc", "def", {"type": "button", "cmd": "coverAll", "name": "close position"}]
            ] 
        })"_json;
        LogStatus("`" + table.dump() + "`", "\n`" + R"({"type": "button", "cmd": "coverAll", "name": "close position"})"_json.dump() + "`");
    }
    
JavaScript Library Extended API Interface