MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / to_json

Method to_json

AgentBench.old/src/tasks/card_game/logic/src/player.cpp:32–39  ·  view source on GitHub ↗

按照成员变量定义顺序转成 JSON 样例: { "id": id, "type": type, "my_fish": my_fish, "fight_fish": fight_fish } */

Source from the content-addressed store, hash-verified

30 }
31*/
32Json::Value Player::to_json() const{
33 Json::Value json;
34 json["id"] = id;
35 json["type"] = type;
36 json["my_fish"] = my_fish.to_json();
37 json["fight_fish"] = fight_fish.to_json();
38 return json;
39}
40
41int Player::get_id(){
42 return id;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected