worked on the json decoding in the doc handler
merge, and added a simple way to copy from one struct to another using the update_scope rules