Added toJson methods for transaction objects