converting clams and boxes into JSON works