Revert "Removed specialized JSON encoder not really needed"
Revert "Removed specialized JSON encoder not really needed"

This reverts commit ea83dcbd9cbe308f678b7eb1947d5be456f94493.

gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine