Implement serialization and deserialization fo/from json format and improved conversion of data types.