Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Saving to Json File fo...
Finance forum
Suggested answer

Saving to Json File format from D365

Posted on by 80

Hi All,

I would like to save a file in Json format, I am currently using Newtonsoft.Json.JsonTextWriter to create the object in D365 , I am able to convert response/payload to string format which is fine. 

Issue is , I need to save this file in Jason format, I understand Json file is a notepad with a format. 

My question , in D365 do we have any option to save it directly to .json file instead of writing a code to create a notepad with json file format? 

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 228,089 Super User 2024 Season 2 on at
    RE: Saving to Json File format from D365

    JSON is a text format. A notepad is not a format; it's a text editor on Windows, i.e. an application capable of reading and writing files. There are many such applications beside Notepad.

    I'm note sure what you're asking about, because "to create a notepad with json file" makes little sense to me. I guess it's either how to save a file in general, or how to set a file extension to .json (maybe by "to create a notepad" you mean "to create a file with .txt extension).

    You didn't tell us how you want to save the file, but if you want to give it to users for download, use something like File::SendFileToUser(stream, 'myfile.json').

  • Suggested answer
    Rahul Mohta Profile Picture
    Rahul Mohta 21,012 on at

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans