Moving ahead, since HTTPService.json or HTTPService.data is not available in
cross-platform 'as HTML' run, I experimented to use custom JSONInputParser
and JSONItemConverter classes to get the JSON string and convert to
ValueObjects. What I did in this process are:

1. I did not modified existing JSON data
2. I added a custom JSONInputParser to my HTTPService/lazyCollection call:

/override public function parseItems(s:String):Array
{
        // this returns me complete JSON data string to JSONItemConverter class
now. Previously a
        // default instance of JSONInputParser were returning incomplete string
chunks to JSONItemConverter
        return [s];
}/

3. In my custom JSONItemConverter class I have this:

/override public function convertItem(data:String):Object
{
        // obj will return me now what I expected to have in HTTPService.json 
        var obj:Object = super.convertItem(data);
        return obj.document;
}/

4. In my HTTPService.complete event handler, now I'm having an array of
elements so I can loop through to create our ValueObjects.


Greatly, the parsing is working now in FireFox across the platforms, joining
in the list of Safari. Following is my updated test matrix:

- Working in Safari and Firefox in Windows and OSX
- Not working in IE anymore in Windows - previously it was working after
enabling 'activeX' control
- Not working in Chrome



--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/FlexJS-HTTPService-for-XML-parsing-tp12094p12140.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to