[misc] Add license header.
XWIKI-9986: The watchlist livetable is empty when the user subscribes to documents containing double quotes
* Build the JSON in memory and then serialize it.