use dict instead of obj to fix api serialization error