This reverts commit b109ff80 and complement test cases. The change was too hasty, as some form values cannot be json-serialized as is.