|
|
|
@@ -33,13 +33,14 @@ namespace { |
|
|
|
const int kSignificantDigits = 10; |
|
|
|
} |
|
|
|
|
|
|
|
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void Pb2Json::ToJson(const ProtobufMsg &message, |
|
|
|
const set<string> &black_fields, |
|
|
|
const char *json_file, bool enum2str) { |
|
|
|
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status Pb2Json::ToJson(const ProtobufMsg &message, |
|
|
|
const set<string> &black_fields, |
|
|
|
const char *json_file, bool enum2str) { |
|
|
|
Json j; |
|
|
|
Message2Json(message, black_fields, j, enum2str); |
|
|
|
ge::parser::ModelSaver::SaveJsonToFile(json_file, j); |
|
|
|
return ge::parser::ModelSaver::SaveJsonToFile(json_file, j); |
|
|
|
} |
|
|
|
|
|
|
|
// JSON parses non utf8 character throwing exceptions, so some fields need to be shielded through black fields |
|
|
|
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void Pb2Json::Message2Json(const ProtobufMsg &message, |
|
|
|
const set<string> &black_fields, Json &json, |
|
|
|
|