FIX JSON API if trans is empty

close #40