additional work and tests to make serialization to json of enums and subobjects