×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Err... well... YAJL is open source.

If you wanted to do this with YAJL, here's what comes to mind:

1) call yajl_stmf_load_tree
2) call yajl_stringify. Currently this does not have an option to beautify the code, though, so you'd need to add a new optional parameter to the subprocedure to make it do a beautify. If you look at the current stringify code, you can see where it's setting beautify to 0, so you'd just need to check if the parm is passed and is *on, pass a 1 instead.
3) write the output of stringify to the temp file.
4) Clean stuff up, etc.


On 1/31/2022 2:36 PM, Brad Stone wrote:
" (hopefully using YAJL... I'm not interested in open source as I don't
want it to be a requisite for the process)."



On Mon, Jan 31, 2022 at 2:31 PM Jack Woehr via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

On Mon, Jan 31, 2022 at 10:31 AM Brad Stone <bvstone@xxxxxxxxx> wrote:.


Let's say I want to use an option to display or edit an existing JSON
file
using DSPF or EDTF, but I want to make sure it's in "pretty" mode to make
it easier to view or edit.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.