oozcitak / xmlbuilder-js

An XML builder for node.js
MIT License
918 stars 107 forks source link

Maximum call stack size exceeded while create XML #235

Closed raja2raj02 closed 4 years ago

raja2raj02 commented 4 years ago

i tried to create a xml from a json data. i am getting an error "Maximum call stack size exceeded" from console. usually get this error because of any methods called itself until the stack exceeded.is this known issue or any work around?

error

oozcitak commented 4 years ago

Any chance you can share the JSON so that I can reproduce?

raja2raj02 commented 4 years ago

Here i am attaching the json file. JsonData.txt

raja2raj02 commented 4 years ago

the issue was circular json. After resolving that i am getting the below error "ERROR Error: Invalid character in name" error1

oozcitak commented 4 years ago

You have some invalid names in your JSON. For example on line 241:

"jsonRule": {
    "$ref": "$"
},

The "$" character cannot be used in XML names, so you need to correct those. I tested by replacing all "$ref" names with "ref" and it works.