Merged _JSON into doc and removed it from properties.

I am too lazy to implement my own deep merge, so $.extend has to suffice. Also
this happens before flat-hierarchy properties are merged into the document,
because this way the user may overwrite the template with custom values.