Hi Rolf, at my morning coffee and I cannot stop thinking of the segfaults you reported. I am using tcl9 both on linux and macos without any build warnings or segfaults. So, I kindly asked Konstantin to independently check and I will post again when he does.
Unless tcl9 is installed at /usr/local you need to provide TCL_LIBRARY_DIR and TCL_INCLUDE_DIR as discussed in the readme.md. I am not 100% sure you did that as I see you load the shared library with load instead of package require. If you were to provide more details, we can fix things, which is on us to make it work for everyone.
That said, I guess we should call up amazon to stop using cjson in their c++ sdk. And, by that I mean, I am glad tdom passes all tests but it is no reason for me to switch to tdom-json. I am using tdom for xml as you know already.
Furthermore, I finally figured out why arrays in tdom were not working for me. I was using xml manipulation commands to create the array without creating an "arraycontainer" node.