Add JSON output and use model obj instead of path