1. JOSE WILLIAM ROMERO OLIVOS
  2. PowerBuilder
  3. Wednesday, 18 October 2023 16:39 PM UTC
Cordial Greetings, Gentlemen.

Is it possible in pb 2022 to export data from datawindows to JSON with the following structure?

invoice{}
user1[{}]
technology services{}
service a [{}]
service b [{}]
service c [{}]
user2[{}]
technology services{}
service a [{}]
service b [{}]
service c [{}]
userXY[{}]
technology services{}
service a [{}]
service b [{}]
service c [{}]

 

Each object or arrangement information is in a data window, in the invoice/detail/detail2 mode.


The idea is to build a JSON with objects and arrays.

I honestly have no experience on the subject, but if anyone can help me, I would be grateful.

Thanks and good day
 
JOSE WILLIAM ROMERO OLIVOS Accepted Answer Pending Moderation
  1. Wednesday, 18 October 2023 19:04 PM UTC
  2. PowerBuilder
  3. # 1
Thank you so much. In conclusion, I only export the base datawindow, and must the rest be done with powerscript?

I think I have understood it.

I export Json in datawindow and do the rest from there.

Thank you so much
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 October 2023 18:11 PM UTC
  2. PowerBuilder
  3. # 2

Hi Jose;

  You would need to use the new JSONGenerator object class and script the Get/Set in PowerScript.

Regards ... Chris

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 18 October 2023 16:58 PM UTC
  2. PowerBuilder
  3. # 3

you need to write your own scripts for that.  use the PB json objects to do that.

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.