chromium/third_party/angle/src/common/serializer/JsonSerializer.h

//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// JsonSerializer.h: Implementation of a JSON based serializer
//

#ifndef COMMON_JSONSERIALIZER_H_
#define COMMON_JSONSERIALIZER_H_

#include "common/angleutils.h"

#if !defined(ANGLE_HAS_RAPIDJSON)
#    error RapidJSON must be available to build this file.
#endif  // !defined(ANGLE_HAS_RAPIDJSON)

#include <rapidjson/document.h>

#include <map>
#include <memory>
#include <sstream>
#include <stack>
#include <type_traits>

namespace angle
{

// Rapidjson has problems picking the right AddMember template for long
// integer types, so let's just make these values use 64 bit variants
template <typename T>
struct StoreAs
{};

template <>
struct StoreAs<unsigned long>
{};

template <>
struct StoreAs<signed long>
{};

class JsonSerializer : public angle::NonCopyable
{};

}  // namespace angle

#endif  // COMMON_JSONSERIALIZER_H_