add json support to the add endpoint