Example #1
0
	static void serializeCycleError(PrintTextA &print) {
		JSON::PFactory f = JSON::create();
		JSON::Value v = f->fromString(jsonSrc);
		JSON::Value arr = v["array"];
		arr->add(v);
		v->erase("text");
		JSON::serialize(v, print.nxChain(), false);
		v->erase("array");
	}
Example #2
0
	void Menu::savePersonData()
	{
		Json::Value json = Json::Value::makeObject();
		json.set("persons", persons.toJson());

		Json::Value playing = Json::Value::makeArray();
		for (Size i = 0; i < listbox[CUR_PLAYERS_LIST]->size(); i++)
		{
			playing.add(Json::Value::makeString(listbox[CUR_PLAYERS_LIST]->getItem(i)));
		}
		json.set("playing", playing);

		Json::Writer writer(true);
		writer.writeToFile(D6_FILE_PHIST, json);
	}