Add support for new json format
Fix bug of equal_total_weight