Demo 4 backend: Fix problem with JSON encoding.