add Json and handling of the q-parameter