mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
LibJS: Add JSON.parse
This commit is contained in:
parent
e8e728454c
commit
b155e64b67
6 changed files with 218 additions and 5 deletions
|
@ -26,8 +26,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class JSONObject final : public Object {
|
||||
|
@ -52,6 +50,12 @@ private:
|
|||
static String serialize_json_array(Interpreter&, StringifyState&, Object&);
|
||||
static String quote_json_string(String);
|
||||
|
||||
// Parse helpers
|
||||
static Object* parse_json_object(Interpreter&, const JsonObject&);
|
||||
static Array* parse_json_array(Interpreter&, const JsonArray&);
|
||||
static Value parse_json_value(Interpreter&, const JsonValue&);
|
||||
static Value internalize_json_property(Interpreter&, Object* holder, const PropertyName& name, Function& reviver);
|
||||
|
||||
static Value stringify(Interpreter&);
|
||||
static Value parse(Interpreter&);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue