Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Saving to Json File format from D365

(0) ShareShare
ReportReport
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 230,371 Most Valuable Professional 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,014 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans