Finally made convert to JSON work