Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10308

Unable to parse multi dimensional arrays with more than 2 levels

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Master
    • 4.0.0
    • cordova-osx
    • Patch, Important

    Description

      This bug entry corresponds to pull request https://github.com/apache/cordova-osx/pull/29

      Detail:

      As we send arguments with commands to objc from javascript, current implementation "convertWebScriptObjectToNSArray" and "convertWebScriptObjectToNSDictionary" converts Javascript objects to NSArray/NSDictionary but it doesn't parse the children at 2nd level and show zero elements in there.

      Input:

      x = { a : { b:

      { c : "Hi" }

      } };

      Output:

      x = { a : { b : { } } };

      Solution:
      Replace the current method with "[[webScriptObject JSValue] toArray]" which a native method of apple webkit solves the problem.

      Please give a look at pull request
      https://github.com/apache/cordova-osx/pull/29

      Attachments

        Activity

          People

            tripod Tobias Bocanegra
            sahilrulzs Sahil Bhardwaj
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified