Add activity_type_id to case_type api output

I'm confused by this line. What's the point of encoding json and then immediately decoding it?