Coverage Report

Created: 2025-06-13 07:33

/src/osquery/osquery/remote/serializers/json.h
Line
Count
Source (jump to first uncovered line)
1
/**
2
 * Copyright (c) 2014-present, The osquery authors
3
 *
4
 * This source code is licensed as defined by the LICENSE file found in the
5
 * root directory of this source tree.
6
 *
7
 * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
8
 */
9
10
#pragma once
11
12
#include <osquery/remote/requests.h>
13
14
namespace osquery {
15
16
/**
17
 * @brief JSON Serializer
18
 */
19
class JSONSerializer : public Serializer {
20
 public:
21
  /**
22
   * @brief See Serializer::serialize
23
   */
24
  Status serialize(const JSON& json, std::string& serialized);
25
26
  /**
27
   * @brief See Serializer::deserialize
28
   */
29
  Status deserialize(const std::string& serialized, JSON& json);
30
31
  /**
32
   * @brief See Serializer::getContentType
33
   *
34
   * @return The content type
35
   */
36
0
  std::string getContentType() const { return "application/json"; }
37
};
38
}