todict() method to support converting Attribute to JSON
JSON tools: convert Nodes to and from JSON