Path: blob/master/Utilities/cmcppdap/src/json_serializer.h
3153 views
// Copyright 2020 Google LLC1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// https://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314#ifndef dap_json_serializer_h15#define dap_json_serializer_h1617#if defined(CPPDAP_JSON_NLOHMANN)18#include "nlohmann_json_serializer.h"19#elif defined(CPPDAP_JSON_RAPID)20#include "rapid_json_serializer.h"21#elif defined(CPPDAP_JSON_JSONCPP)22#include "jsoncpp_json_serializer.h"23#else24#error "Unrecognised cppdap JSON library"25#endif2627namespace dap {28namespace json {2930#if defined(CPPDAP_JSON_NLOHMANN)31using Deserializer = NlohmannDeserializer;32using Serializer = NlohmannSerializer;33#elif defined(CPPDAP_JSON_RAPID)34using Deserializer = RapidDeserializer;35using Serializer = RapidSerializer;36#elif defined(CPPDAP_JSON_JSONCPP)37using Deserializer = JsonCppDeserializer;38using Serializer = JsonCppSerializer;39#else40#error "Unrecognised cppdap JSON library"41#endif4243} // namespace json44} // namespace dap4546#endif // dap_json_serializer_h474849