Added json and debugged.