summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2012-03-26 16:27:46 +0200
committerFlorian Frank <flori@ping.de>2012-04-27 20:23:52 +0200
commitfc740f59c0ebd3fb2d71fa98a57dce6002c16af0 (patch)
tree08074d745532a1fe51e756858474ede4b80378bc /ext
parent5f14e1c9501f5aea51554824be231ab60f689ae4 (diff)
downloadjson-fc740f59c0ebd3fb2d71fa98a57dce6002c16af0.tar.gz
Add a comment mentioning some limitiation
Diffstat (limited to 'ext')
-rw-r--r--ext/json/ext/generator/generator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c
index 279c49d..b1babb1 100644
--- a/ext/json/ext/generator/generator.c
+++ b/ext/json/ext/generator/generator.c
@@ -852,6 +852,11 @@ static VALUE cState_partial_generate(VALUE self, VALUE obj)
return fbuffer_to_s(buffer);
}
+/*
+ * This function returns true if string is either a JSON array or JSON object.
+ * It might suffer from false positives, e. g. syntactically incorrect JSON in
+ * the string or certain UTF-8 characters on the right hand side.
+ */
static int isArrayOrObject(VALUE string)
{
long string_len = RSTRING_LEN(string);