Fix json serialization error on getPartsSorted.