| 250 | |
| 251 | FS(Json::Value* json) : json(json) {} |
| 252 | bool field(const std::string& name, const SerializeFunc& cb) override { |
| 253 | JsonCppSerializer s(&(*json)[name]); |
| 254 | auto res = cb(&s); |
| 255 | if (s.removed) { |
| 256 | json->removeMember(name); |
| 257 | } |
| 258 | return res; |
| 259 | } |
| 260 | }; |
| 261 | |
| 262 | *json = Json::Value(Json::objectValue); |
nothing calls this directly
no test coverage detected