v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::JSON Class Reference

#include <v8-json.h>

Collaboration diagram for v8::JSON:

Static Public Member Functions

static V8_WARN_UNUSED_RESULT MaybeLocal< ValueParse (Local< Context > context, Local< String > json_string)
 
static V8_WARN_UNUSED_RESULT MaybeLocal< StringStringify (Local< Context > context, Local< Value > json_object, Local< String > gap=Local< String >())
 

Detailed Description

A JSON Parser and Stringifier.

Definition at line 20 of file v8-json.h.

Member Function Documentation

◆ Parse()

MaybeLocal< Value > v8::JSON::Parse ( Local< Context > context,
Local< String > json_string )
static

Tries to parse the string |json_string| and returns it as value if successful.

Parameters
thecontext in which to parse and create the value.
json_stringThe string to parse.
Returns
The corresponding value if successfully parsed.

Definition at line 3172 of file api.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stringify()

MaybeLocal< String > v8::JSON::Stringify ( Local< Context > context,
Local< Value > json_object,
Local< String > gap = Local<String>() )
static

Tries to stringify the JSON-serializable object |json_object| and returns it as string if successful.

Parameters
json_objectThe JSON-serializable object to stringify.
Returns
The corresponding string if successfully stringified.

Definition at line 3188 of file api.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: