1

I have a basic Windows Forms Application for simple crud operations with my json datas. After I select my current json file, a richtextbox is filled with my json file. Is there a way to open a webpage (codebeautify or jsonformatter) and fill the text area from my richtextbox ?

if its not possible how about these suggestions ?

1- save the json file to a temp .json file and open it with uri's containing my local path file(if its possible of course)

2- uploading the json file to gist github and reopen it like the link below

https://jsonformatter.org/json-viewer/?url=https://gist.githubusercontent.com/jimmibond/9205480889e19c0de347/raw/sample.json

I'm open to any recommendations sorry for my English.

Arda Nalbant
  • 479
  • 2
  • 7
  • 16
  • You can create a jsonHelper class for formatting and validating your json . See this page => https://stackoverflow.com/questions/4580397/json-formatter-in-c – firatt_ Mar 08 '23 at 11:56
  • i can do basic operations like vaildation minify formatting etc. but you cant use richtextbox for editing. So i use webpages like jsonformatter.org. I want to avoid copy paste process – Arda Nalbant Mar 08 '23 at 13:21
  • If it's about editing you may want to use [Monaco editor](https://stackoverflow.com/a/71885536/3110834) if you are looking for an editor. – Reza Aghaei Mar 08 '23 at 16:30
  • If it's only about prettifying, you can use JsonConvert or other libraries to parse and pretty format the json. – Reza Aghaei Mar 08 '23 at 16:33
  • You most likely also can open one of the mentioned web sites in WebBrowser or WebView2 and modify content of a text editor there. And later get the content of the text editor. What's your requirement exactly? – Reza Aghaei Mar 08 '23 at 16:34
  • thanks for the replies. The problem is : richtextbox in the form application is not enough to work with json. its needs coloring , grouping etc. so i need third party websites. but all i want is open the webpage with my json in it. I'm currently developing a desktop project for my team which is utilize some standard crud operations. – Arda Nalbant Mar 09 '23 at 04:35
  • if its possible to open a webpage with monaco editor which automatically has json from my richtextbox i will happyly use it – Arda Nalbant Mar 09 '23 at 04:36

0 Answers0