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

Parent key giving problems with circular references #2

Closed
agyemanjp opened this issue Aug 17, 2016 · 0 comments
Closed

Parent key giving problems with circular references #2

agyemanjp opened this issue Aug 17, 2016 · 0 comments

Comments

@agyemanjp
Copy link

Please add an option to exclude the parent key from the AST. As it is now, the AST cannot be stringified because it will introduce infinite recursion.

Try this example code:

const xmlReader = require('xml-reader');
const markup = `<StackPanelVertical><Banner title="title" logo="logo.jpg"/><Footer/></StackPanelVertical>`;
const result = xmlReader.parseSync(markup);
console.log(JSON.stringify(result));

This will give an error. In most cases, there is no need for the parent key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant