[webkit-reviews] review denied: [Bug 34887] Add API to directly expose JSON parsing : [Attachment 50479] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 11 11:55:21 PST 2010


Mark Rowe (bdash) <mrowe at apple.com> has denied Oliver Hunt <oliver at apple.com>'s
request for review:
Bug 34887: Add API to directly expose JSON parsing
https://bugs.webkit.org/show_bug.cgi?id=34887

Attachment 50479: Patch
https://bugs.webkit.org/attachment.cgi?id=50479&action=review

------- Additional Comments from Mark Rowe (bdash) <mrowe at apple.com>
> +/* Converting to and from JSON formatted strings */
> +
> +/*!
> + @function
> + @abstract	    Creates a JavaScript value from a JSON formatted string.
> + @param ctx	    The execution context to use.
> + @param string   The JSString containing the JSON string to be parsed.
> + @result	    A JSValue containing the parsed value, or NULL if the input
is invalid.
> + */
> +JS_EXPORT JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef
string);
> +
> +/*!
> + @function
> + @abstract	    Creates a JavaScript string containing the JSON serialized
representation of a JS value.
> + @param ctx	    The execution context to use.
> + @param value    The value to serialize.
> + @param indent   The number of spaces to indent when nesting.  If 0, the
resulting JSON will not contains newlines.  The size of the indent is clamped
to 10 spaces.
> + @param exception A pointer to a JSValueRef in which to store an exception,
if any. Pass NULL if you do not care to store an exception.
> + @result	    A JSString with the result of serialization, or NULL if an
exception is thrown.
> + */
> +JS_EXPORT JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef
value, unsigned indent, JSValueRef* exception);

These two functions need to be tagged in the header with availability macros
indicating which version of JavaScriptCore they were introduced with.

> +    

Please don’t add trailing white space.

>  /*!
> @@ -248,7 +270,7 @@ JS_EXPORT JSStringRef JSValueToStringCopy(JSContextRef
ctx, JSValueRef value, JS
>  @result	   The JSObject result of conversion, or NULL if an exception
is thrown.
>  */
>  JS_EXPORT JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value,
JSValueRef* exception);
> -
> +    

Same here!


More information about the webkit-reviews mailing list