JackWFinlay / jsonize

Convert HTML to JSON.
MIT License
22 stars 12 forks source link

Add option to output Nodes that are built in the process of conversion #23

Closed JackWFinlay closed 4 years ago

JackWFinlay commented 7 years ago

Return the root Node object as an output option. Add options to traverse the child Nodes within.

rmnblm commented 7 years ago

I'm a bit confused about this issue. Could you please clarify your requirements for this issue and maybe give an example how you'd like to use it?

JackWFinlay commented 7 years ago

During conversion, there is an intermediate step of build a parent Node object that has all the child html elements as Nodes themselves. I want to be able to return that to the user as a different method (just like the one that does JOjects).

I was thinking though of maybe implementing a different class of node above the parent node that contains some meta data about the tree of nodes. It would have things like source and node counts for each type. This would be useful in another project I have in mind that will implement this library.