Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5 from abhishekbhardwaj/master

Wraps name properties and data in double quotes
  • Loading branch information...
commit a592d511535f1145107485de8cebd40c4adc5534 2 parents b61901e + 8f5e17b
Dražen authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 js/functions.js
8 js/functions.js
View
@@ -136,8 +136,8 @@ $(document).ready(function () {
$('#generatedcode').text(xml);
} else if (settings.type === "jsontype") {
json += "{";
- json += "\n\tcountries: {";
- json += "\n\t\tcountry: [";
+ json += "\n\t\"countries\": {";
+ json += "\n\t\t\"country\": [";
for(var i = 0; i < valuesLength; i++) {
json += "\n\t\t\t{";
for (var j = 0; j < oLength; j++) {
@@ -145,9 +145,9 @@ $(document).ready(function () {
var currValue = allValues[i][options[j]];
if (j == (oLength - 1)) {
- json += "\n\t\t\t\t" + currOption + ": '" + currValue + "'";
+ json += "\n\t\t\t\t\"" + currOption + "\": \"" + currValue + "\"";
} else {
- json += "\n\t\t\t\t" + currOption + ": '" + currValue + "',";
+ json += "\n\t\t\t\t\"" + currOption + "\": \"" + currValue + "\",";
}
}
if (i == (valuesLength - 1)) {
Please sign in to comment.
Something went wrong with that request. Please try again.