Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index bc6edf5cea8ab4bb2d64e7716c8a8ddbb0fcd133..f28f8ae757f984af76ba5af0ddc197de8e51bf05 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -1665,9 +1665,8 @@ struct SampleInfo { |
| StateTag vm_state; |
| }; |
| - |
| /** |
| - * A JSON Parser. |
| + * A JSON Parser and Stringifier. |
| */ |
| class V8_EXPORT JSON { |
| public: |
| @@ -1682,6 +1681,18 @@ class V8_EXPORT JSON { |
| Local<Value> Parse(Local<String> json_string)); |
| static V8_WARN_UNUSED_RESULT MaybeLocal<Value> Parse( |
|
haavardm
2016/04/15 10:44:49
Should this be deprecated?
jochen (gone - plz use gerrit)
2016/04/15 10:50:11
yes, please mark it as V8_DEPRECATE_SOON - that me
haavardm
2016/04/15 11:45:23
Done.
|
| Isolate* isolate, Local<String> json_string); |
| + static V8_WARN_UNUSED_RESULT MaybeLocal<Value> Parse( |
| + Local<Context> context, 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); |
|
jochen (gone - plz use gerrit)
2016/04/15 10:50:11
should also take a Local<Context> instead of Isola
haavardm
2016/04/15 11:45:23
Done.
|
| }; |