Sha256: 7ac22ac74ebac312a5901478e398ef1d3a29f0ef56accb6d6736d47e0dbb4cdc

Contents?: true

Size: 1.32 KB

Versions: 100

Compression:

Stored size: 1.32 KB

Contents

// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef INCLUDE_V8_JSON_H_
#define INCLUDE_V8_JSON_H_

#include "v8-local-handle.h"  // NOLINT(build/include_directory)
#include "v8config.h"         // NOLINT(build/include_directory)

namespace v8 {

class Context;
class Value;
class String;

/**
 * A JSON Parser and Stringifier.
 */
class V8_EXPORT JSON {
 public:
  /**
   * Tries to parse the string |json_string| and returns it as value if
   * successful.
   *
   * \param the context in which to parse and create the value.
   * \param json_string The string to parse.
   * \return The corresponding value if successfully parsed.
   */
  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(
      Local<Context> context, Local<Value> json_object,
      Local<String> gap = Local<String>());
};

}  // namespace v8

#endif  // INCLUDE_V8_JSON_H_

Version data entries

100 entries across 99 versions & 2 rubygems

Version Path
libv8-node-23.6.1.0-x86_64-linux-musl vendor/v8/include/v8-json.h
libv8-node-23.6.1.0-x86_64-linux vendor/v8/include/v8-json.h
libv8-node-23.6.1.0-x86_64-darwin vendor/v8/include/v8-json.h
libv8-node-23.6.1.0-arm64-darwin vendor/v8/include/v8-json.h
libv8-node-23.6.1.0-aarch64-linux vendor/v8/include/v8-json.h
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/libv8-node-18.19.0.0-x86_64-darwin/vendor/v8/include/v8-json.h
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/libv8-node-18.19.0.0-x86_64-darwin/vendor/v8/include/v8-json.h
libv8-node-22.7.0.4-arm64-darwin vendor/v8/include/v8-json.h
libv8-node-22.7.0.4-x86_64-linux-musl vendor/v8/include/v8-json.h
libv8-node-22.7.0.4-x86_64-linux vendor/v8/include/v8-json.h
libv8-node-22.7.0.4-x86_64-darwin vendor/v8/include/v8-json.h
libv8-node-22.7.0.4-aarch64-linux vendor/v8/include/v8-json.h
libv8-node-22.7.0.3-x86_64-linux-musl vendor/v8/include/v8-json.h
libv8-node-22.7.0.3-x86_64-linux vendor/v8/include/v8-json.h
libv8-node-22.7.0.3-arm64-darwin vendor/v8/include/v8-json.h
libv8-node-22.7.0.3-aarch64-linux vendor/v8/include/v8-json.h
libv8-node-22.7.0.2-x86_64-linux-musl vendor/v8/include/v8-json.h
libv8-node-22.7.0.2-x86_64-linux vendor/v8/include/v8-json.h
libv8-node-22.7.0.2-x86_64-darwin vendor/v8/include/v8-json.h
libv8-node-22.7.0.2-arm64-darwin vendor/v8/include/v8-json.h