NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: AtoB on October 24, 2022, 11:24:24 AM

Title: jFiles : "pretty" JSON?
Post by: AtoB on October 24, 2022, 11:24:24 AM
Hi all,

I've this json that I receive and I can nicely parse this with jFiles. But sometimes I need the json in "pretty" format (for debugging etc.). Is there an option in JFiles to convert the json to pretty (and back to compact)?

Currently I move the raw data to an external editor and format it there, but maybe jFiles has this feature somewhere in it ...

TIA
Title: Re: jFiles : "pretty" JSON?
Post by: Jane on October 24, 2022, 01:42:38 PM
Maybe play with the format parameter on the Save method?  https://www.capesoft.com/docs/jfiles2/jfiles.htm#Save
Title: Re: jFiles : "pretty" JSON?
Post by: Bruce on October 26, 2022, 04:13:38 AM
>> Is there an option in JFiles to convert the json to pretty (and back to compact)?

  json.load('somefile.json')
  json.saveString(str,jf:format)

Cheers
Bruce