blob: ba677699b0fe88b27009ba6088343a30e08e172d [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef DIAGNOSTICS_WILCO_DTC_SUPPORTD_JSON_UTILS_H_
#define DIAGNOSTICS_WILCO_DTC_SUPPORTD_JSON_UTILS_H_
#include <string>
#include <base/strings/string_piece.h>
namespace diagnostics {
// Validates |json| and copies error message to |json_error_message| if |json|
// is not valid.
//
// |json_error_message| must be non-NULL.
//
// Returns true if |json| is valid, otherwise false.
bool IsJsonValid(base::StringPiece json, std::string* json_error_message);
} // namespace diagnostics
#endif // DIAGNOSTICS_WILCO_DTC_SUPPORTD_JSON_UTILS_H_