× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



When you say "editing" Brad do you mean just changing the content or adding new elements and/or structures?

I can think of a way to do editing with DATA-INTO and DATA-GEN - even limited addition of elements - but it would be a lot of work to add structures and changing them would be a no-no.


Jon P.



On Jan 31, 2022, at 12:31 PM, Brad Stone <bvstone@xxxxxxxxx> wrote:

I am wondering if anyone has done this... maybe using YAJL.

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.

Is there a combination of YAJL functions that could be used to open,
prettify (even if it is already in pretty or not), and then replace the
existing file before viewing or editing? It's ok if it stays in pretty
mode as I don't think that really causes problems.

Wanted to ask before I try to reinvent the wheel.

So the steps in the program would be:
1. open existing JSON stream file in the IFS.
2. Make it pretty (hopefully using YAJL... I'm not interested in open
source as I don't want it to be a requisite for the process).
3. Save it as pretty (easy enough using YAJL).
4. DSPF/EDTF on the stream file

Yes, I know editing JSON on a green screen isn't ideal. :)

Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any Cloud
Provider!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


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-2024 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.