Fixed issue with field type JSON parsing.

The `Money` and `Map` fields caused a parsing exception due to
malformed domain object definitions. This is now fixed.

Fixes: #2994