1. John Strano
  2. PowerBuilder
  3. Tuesday, 17 January 2023 19:15 PM UTC

Yes, I can use the JSONGenerator to build a file to spec from scratch, but I'd like to avoid that.

I'd rather use an existing JSON file as a template, as a foundation, a starting point.

There are a number of Key/Value pairs whose Key name is not unique.
e.g."Person" exists for both sender and for recipient branches.
They're only unique by virtue of their path in the file.

How may I use Packager or Generator or both in concert?

...to develop a SetItemByPath() emulation as it were.

I have plenty of experience using GetItemByPath() with the parser, but how can I then write the value to this item?

Thank you.

Accepted Answer
John Strano Accepted Answer Pending Moderation
  1. Wednesday, 18 January 2023 13:04 PM UTC
  2. PowerBuilder
  3. # Permalink

Just yesterday, a response to another thread provided my answer.

 

Please refer to "How to edit .json that contains nested objects?"

 

A technique using jsonPackage was suggested by Benjamin Gaesslein https://community.appeon.com/index.php/qna/q-a/profile/4003-benjamin-gaesslein and was quite useful. 

Comment
  1. Sivaprakash BKR
  2. Tuesday, 24 January 2023 02:21 AM UTC
Nice to hear that you found a solution.

  1. Helpful
  1. Armeen Mazda @Appeon
  2. Tuesday, 24 January 2023 17:35 PM UTC
Thanks for highlighting the solution!
  1. Helpful
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 18 January 2023 08:19 AM UTC
  2. PowerBuilder
  3. # 1

1.  A sample data would make it better.  
2.  Otherwise, you can try to insert required data in a datawindow and export that data to json.   Check whether it satisfies your need.

Happiness Always
BKR Sivaprakash

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.