What does it do to set a file (report) export file extension to "json" instead of "csv"?

sgolux
sgolux Expensify Customer Posts: 2 Expensify Newcomer

Hello.

According to API docs, when you export a report it actually creates a file that is subsequently downloaded. When you create that file, you give it a file extension and you also provide a template. How do these interact? Presumably the template is the thing that causes the file to have it's ultimate content. So how does it help to set the file extension to "json" (say) instead of "csv"? It seems you need to write a template to make the file content be json if that is what you want. So is the file extension purely a thing that is part of naming a file completely independent of content? Which of course then begs the question of creating a file in (say) "xslx" format - are we expected to write a template that knows how to do that? Or "pdf"? That seems like an absurdly high learning curve.

So really just a conceptual frame of how file extensions, file types, and templates inter-relate with one another would be super-helpful.

Answers