Added approximate implementation of json I/O functionality for complex types.