add type to json return
Merge pull request #7 from albertlb/deal_with_type

add type to json return