Revert "This looks like a better way to serialize"

This reverts commit ce3fd6979ce4e7c367bf59946ad0e7d606a6a440.
added test to verify that JSON serialization is compatible with
mapping