use object hook to deal with nested dict.