Bumping manifests a=b2g-bump
[gecko.git] / js / src / json.h
blob072dfd947a22e60f3fb62b6a1454bf5fb286dd5b
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sts=4 et sw=4 tw=99:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef json_h
8 #define json_h
10 #include "mozilla/Range.h"
12 #include "NamespaceImports.h"
14 #include "js/RootingAPI.h"
16 namespace js {
17 class StringBuffer;
20 extern JSObject*
21 js_InitJSONClass(JSContext* cx, js::HandleObject obj);
23 extern bool
24 js_Stringify(JSContext* cx, js::MutableHandleValue vp, JSObject* replacer,
25 js::Value space, js::StringBuffer& sb);
27 namespace js {
29 template <typename CharT>
30 extern bool
31 ParseJSONWithReviver(JSContext* cx, const mozilla::Range<const CharT> chars,
32 HandleValue reviver, MutableHandleValue vp);
34 } // namespace js
36 #endif /* json_h */