fix reduce toJson