Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: include/v8.h

Issue 1847823004: Expose JSON stringifier through V8 API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Compile Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index ef311d347054afb255d581a795e2f424c78ac17b..bd1dc32c9ad39b5011565a4e1652fd58fae2460e 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1680,6 +1680,16 @@ class V8_EXPORT JSON {
Local<Value> Parse(Local<String> json_string));
static V8_WARN_UNUSED_RESULT MaybeLocal<Value> Parse(
Isolate* isolate, Local<String> json_string);
+
+ /**
+ * Tries to stringify the JSON-serializable object |json_object| and returns
+ * it as string if successful.
+ *
+ * \param json_object The JSON-serializable object to stringify.
+ * \return The corresponding string if successfully stringified.
+ */
+ static V8_WARN_UNUSED_RESULT MaybeLocal<String> Stringify(
+ Isolate* isolate, Local<Object> json_object);
Toon Verwaest 2016/04/04 10:43:39 Shouldn't this get the context as input, like v8::
Yang 2016/04/04 10:55:43 The parser should definitely get a context as argu
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698