Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toJSON() receives wrong structure #42

Closed
ghost opened this issue Feb 27, 2014 · 3 comments
Closed

toJSON() receives wrong structure #42

ghost opened this issue Feb 27, 2014 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 27, 2014

Hi, great plugin. really loved it.

Now when I tried using .toJSON() xml2json returns an error at line 109:
Uncaught TypeError: Cannot read property 'length' of undefined

I believe it is because of line 365 in your plugin which returns:
return $.xml2json(this.content);
The structure of the data sent is:
#document.<soap:envelope>...

I fixed this by replacing line 365 by:
return $.xml2json(this.content.documentElement.outerHTML);

Is it something wrong with my SOAP sent?

@doedje
Copy link
Owner

doedje commented Feb 27, 2014

I am not quite sure if there is something wrong with your SOAP being sent. I have tried toJSON with the original code and with your replacements and both seem to be working fine... I don't know, maybe there is a difference in which xml2json plugin you are using.... The one I use is:

http://www.fyneworks.com/jquery/xml-to-json/

@doedje
Copy link
Owner

doedje commented Mar 10, 2014

can I close this issue?

@ghost
Copy link
Author

ghost commented Mar 10, 2014

yeah mate

Romain Gonçalvès @ Santech

On Mon, Mar 10, 2014 at 4:05 PM, Remy Blom notifications@github.com wrote:

can I close this issue?

Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-37191961
.

@doedje doedje closed this as completed Mar 10, 2014
@doedje doedje added the wontfix label Apr 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant