better parsing
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/cc0c2e1b Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/cc0c2e1b Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/cc0c2e1b Branch: refs/heads/develop Commit: cc0c2e1b286e33df6af010cc3a146d06d36ddb2f Parents: 0b646ae Author: Alex Harui <[email protected]> Authored: Mon Dec 22 10:04:45 2014 -0800 Committer: Alex Harui <[email protected]> Committed: Mon Dec 22 10:04:45 2014 -0800 ---------------------------------------------------------------------- frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cc0c2e1b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js index d72f71f..e03201c 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/net/JSONInputParser.js @@ -39,5 +39,10 @@ org.apache.flex.net.JSONInputParser.prototype.FLEXJS_CLASS_INFO = * @return {Array.<string>} The Array of unparsed objects. */ org.apache.flex.net.JSONInputParser.prototype.parseItems = function(s) { + var c = s.indexOf('['); + if (c != -1) { + var c2 = s.lastIndexOf(']'); + s = s.substring(c + 1, c2); + } return s.split('},'); };
