This commit is contained in:
aozhiwei 2022-12-12 16:18:28 +08:00
parent 9ffd860416
commit 37c1840e2e
8 changed files with 12 additions and 18 deletions

View File

@ -1,4 +1,4 @@
#include "framework/cpp/dynmodule.h"
#include "f8/dynmodule.h"
namespace f8
{

View File

@ -17,9 +17,9 @@
#include <a8/curl.h>
#include <a8/mutable_xobject.h>
#include "framework/cpp/httpclientpool.h"
#include "framework/cpp/msgqueue.h"
#include "framework/cpp/utils.h"
#include "f8/httpclientpool.h"
#include "f8/msgqueue.h"
#include "f8/utils.h"
#define F8_MUTLI_THREAD_HTTP 1

View File

@ -2,7 +2,7 @@
#include <a8/timer.h>
#include "framework/cpp/msgqueue.h"
#include "f8/msgqueue.h"
#include "app.h"
namespace f8

View File

@ -4,9 +4,9 @@
#include <google/protobuf/message.h>
#include <google/protobuf/descriptor.h>
#include "framework/cpp/utils.h"
#include "framework/cpp/protoutils.h"
#include "framework/cpp/netmsghandler.h"
#include "f8/utils.h"
#include "f8/protoutils.h"
#include "f8/netmsghandler.h"
namespace f8
{

View File

@ -1,6 +1,6 @@
#include "precompile.h"
#include "framework/cpp/protoutils.h"
#include "f8/protoutils.h"
#include <a8/tcpclient.h>
#include <a8/asynctcpclient.h>

View File

@ -1,7 +1,7 @@
#include <a8/a8.h>
#include <cmath>
#include <a8/stringlist.h>
#include "framework/cpp/tiledmap.h"
#include "f8/tiledmap.h"
namespace f8
{

View File

@ -1,6 +1,6 @@
#include "precompile.h"
#include "framework/cpp/types.h"
#include "f8/types.h"
#include <a8/mutable_xobject.h>
namespace f8

View File

@ -10,11 +10,9 @@
#include <google/protobuf/message.h>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION > 2005000
#include <google/protobuf/util/json_util.h>
#endif
#include "framework/cpp/utils.h"
#include "f8/utils.h"
namespace f8
{
@ -538,15 +536,11 @@ namespace f8
std::string PbToJson(google::protobuf::Message* pbmsg)
{
std::string json;
#if GOOGLE_PROTOBUF_VERSION > 2005000
google::protobuf::util::JsonPrintOptions options;
options.add_whitespace = true;
options.always_print_primitive_fields = true;
options.preserve_proto_field_names = true;
MessageToJsonString(*pbmsg, &json, options).ok();
#else
json = "{}";
#endif
return json;
}