mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Typo fixes related to jerry_json_stringify (#2611)
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
parent
c87aa83b0d
commit
f9e21540d6
@ -5991,7 +5991,7 @@ jerry_value_t jerry_json_parse (const jerry_char_t *string_p, jerry_size_t strin
|
||||
}
|
||||
```
|
||||
|
||||
## jerry_stringify
|
||||
## jerry_json_stringify
|
||||
|
||||
**Summary**
|
||||
|
||||
@ -6000,7 +6000,7 @@ jerry_value_t jerry_json_parse (const jerry_char_t *string_p, jerry_size_t strin
|
||||
**Prototype**
|
||||
|
||||
```c
|
||||
jerry_value_t jerry_json_stringfy (const jerry_value_t object_to_stringify)
|
||||
jerry_value_t jerry_json_stringify (const jerry_value_t object_to_stringify)
|
||||
```
|
||||
|
||||
- `object_to_stringify` - a jerry_value_t object to stringify
|
||||
@ -6016,7 +6016,7 @@ jerry_value_t jerry_json_stringfy (const jerry_value_t object_to_stringify)
|
||||
jerry_value_t key = jerry_create_string ((const jerry_char_t *) "name");
|
||||
jerry_value_t value = jerry_create_string ((const jerry_char_t *) "John");
|
||||
jerry_set_property (obj, key, value);
|
||||
jerry_value_t stringified = jerry_json_stringfy (obj);
|
||||
jerry_value_t stringified = jerry_json_stringify (obj);
|
||||
|
||||
//stringified now contains a json formated string
|
||||
|
||||
|
||||
@ -3406,7 +3406,7 @@ jerry_json_parse (const jerry_char_t *string_p, /**< json string */
|
||||
* @return json formated jerry_value_t or an error massage
|
||||
*/
|
||||
jerry_value_t
|
||||
jerry_json_stringfy (const jerry_value_t object_to_stringify) /**< a jerry_object_t to stringify */
|
||||
jerry_json_stringify (const jerry_value_t object_to_stringify) /**< a jerry_object_t to stringify */
|
||||
{
|
||||
jerry_assert_api_available ();
|
||||
#ifndef CONFIG_DISABLE_JSON_BUILTIN
|
||||
@ -3423,7 +3423,7 @@ jerry_json_stringfy (const jerry_value_t object_to_stringify) /**< a jerry_objec
|
||||
|
||||
return jerry_throw (ecma_raise_syntax_error (ECMA_ERR_MSG ("The JSON has been disabled.")));
|
||||
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
|
||||
} /* jerry_json_stringfy */
|
||||
} /* jerry_json_stringify */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@ -601,7 +601,7 @@ jerry_value_t jerry_get_typedarray_buffer (jerry_value_t value,
|
||||
jerry_length_t *byte_offset,
|
||||
jerry_length_t *byte_length);
|
||||
jerry_value_t jerry_json_parse (const jerry_char_t *string_p, jerry_size_t string_size);
|
||||
jerry_value_t jerry_json_stringfy (const jerry_value_t object_to_stringify);
|
||||
jerry_value_t jerry_json_stringify (const jerry_value_t object_to_stringify);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@ -937,7 +937,7 @@ main (void)
|
||||
jerry_value_t key = jerry_create_string ((const jerry_char_t *) "name");
|
||||
jerry_value_t value = jerry_create_string ((const jerry_char_t *) "John");
|
||||
jerry_set_property (obj, key, value);
|
||||
jerry_value_t stringified = jerry_json_stringfy (obj);
|
||||
jerry_value_t stringified = jerry_json_stringify (obj);
|
||||
TEST_ASSERT (jerry_value_is_string (stringified));
|
||||
char buff[jerry_get_string_length (stringified)];
|
||||
jerry_string_to_char_buffer (stringified, (jerry_char_t *) buff,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user