Sign In/My Account | View Cart  
advertisement

Article:
 Converting Between XML and JSON
Subject: tab is not really optional in xml2json
Date: 2006-11-16 15:39:41
From: tschaub

Thanks for the great code. The usage on http://goessner.net/download/prj/jsonxml/ suggests that tab is optional for both functions.


If you omit the tab argument in xml2json, you get "undefined" prepended to your json. Perhaps the return was supposed to be something like:


return "{\n" + (tab ? tab + json.replace...


instead of


return "{\n" + tab + (tab ? json.replace...


Thanks again.


Previous Message Previous Message   Next Message Next Message


Sponsored By: