Update V8 to version 4.4.28.
[chromium-blink-merge.git] / chromecast / base / serializers.h
blobdf278fdbc0f887e4c164341a30559d3b5e11bf0b
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_BASE_SERIALIZERS_H_
6 #define CHROMECAST_BASE_SERIALIZERS_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace base {
13 class Value;
16 namespace chromecast {
18 // Helper function which deserializes JSON |text| into a base::Value. If |text|
19 // is empty, is not valid JSON, or if some other deserialization error occurs,
20 // the return value will hold the NULL pointer.
21 scoped_ptr<base::Value> DeserializeFromJson(const std::string& text);
23 // Helper function which serializes |value| into a JSON string. If a
24 // serialization error occurs,the return value will hold the NULL pointer.
25 scoped_ptr<std::string> SerializeToJson(const base::Value& value);
27 } // namespace chromecast
29 #endif // CHROMECAST_BASE_SERIALIZERS_H_