diff options
author | Florian Frank <flori@ping.de> | 2012-03-26 16:27:46 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2012-03-26 16:27:46 +0200 |
commit | e5fea468625044323809df453da62773eb6daad7 (patch) | |
tree | 49262ed8c6af5184f5e09d6f21eb3af25edbc435 | |
parent | 519437ab428d67f4b4105e2a94f2f2c1601fdcf5 (diff) | |
download | json-e5fea468625044323809df453da62773eb6daad7.tar.gz |
Add a comment mentioning some limitiation
-rw-r--r-- | ext/json/ext/generator/generator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/json/ext/generator/generator.c b/ext/json/ext/generator/generator.c index cfd00b5..e1f2d09 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); |