Changes to the decoder callbacks so that it's possible to take completed results
as parsing continues. You can take the contents of root and then allow them to be garbage collected by deleting the list elements.