Discussions tagged JSON

I am studding the JSON support in PowerBuilder 2019 (R2) and I am a bit confused on how can I obtain the JSON string of a key in an array. Let's suppose that you have the following JSON: { "Sales":[ { "DiscountType":{ "Id":1, "Label":"667 trig", "C...
Hi PBers.....! I recently tested / used the dw.ExportJson() combined with JSONPackage and I am starting to feel that it's time to move on, from restful XML services to JSON.  What worries me is that I didn't find any way to limit the data exported ...
Hi, I can't find any way how to import JSON data to nested DataWindow report. Is here anyone who knows how to do it? I can import data to the main DataWindow, but I can't find out any way how to import it to the nested one. It just stays empty now. ...
We are on PB 2017 LTR and looking for simple syntax to convert a simple powerbuilder array to and from Json so we can save the array values in simple Json , then reload the array directly from JSON. We never used json before and a little inexperienc...
Hi, I need to access the json array, but I can't find a way to do that. Array: {    "department_array":[       {          "name":"Website",         "col1":"AAA",         "col2":"AEI"      },      {          "name":"PowerBuilder",         "col1":"B...
Hi All, The result set return by the datastore is a JSON format which is different when compared with the JSON string returned by the datastore.ExportPlainJson built in method: teh column names are surrounded by the back slash character \ Example i...
PB 2017 R3 build 1858  32 bit application I have been doing a lot of web client refactoring lately, using JSON. I some instances I send and receive huge JSON return data sets, of a complex, nested  nature and containing base64 encoded images. One ...
In my PowerBuilder Client, I want to use the JsonPackage object to send the result sets of two datastores to our Web API that was created with SnapDevelop.  Here is my PB code: //set values of JSONPackage with API datastores ljpk_submit.setvalue( "...
Hi Everyone, I've got a question about how people are creating complex JSON for real world applications.  I'm updating an application to use a third party's REST API and some of the API calls require reasonably complex JSON to be sent. The JSON may ...
Hi all, When exporting large numbers to JSON using the ExportJSON DataWindow method the numbers are converted to scientific notation and precision is lost. For example, a number like 284,932,785.56 gets converted to something like 2.8493E+08 (don't...
Hi everyone, i try to parse a JSON-String with the new functionalitys of PB2019 and get this error message: "Failed to load the JSON data because its root node is not an object" sample code:   string ls_json, ls_returnJSONPackage luo_jsonluo_json...
I get a JSON like : {"data": {"name": "\u9673\u6cf0\u5c71", "coupon": [], "is_active": true, "sex": "male", "birthday": "2019-05-15T16:00:00Z", "mobile_number": "+88696631", "balance": 10}}   name is Chinese What function can help me convert it t...
Upon which JSON parser is PowerBuilder 2019 based? I can then reference which syntax variations are tolerated.   Thank you....
Hi Guru. I can't import a jason file (I extracted the code from the example 'json' which is found in codexchange) I list the steps I take: 1. I export dw data in the (standard) format ls_json = dw_1.Exportjson (true) 2. Import: dw_1.DataO...
Hello All, I have a DW with column names like :Column1, FirstName,LastName when i create the json file using exportJson the Json is generated with names in lowercase  column1,firstname,lastname and that cause a problem when i try to import it in...
I am in the process of converting an existing PowerBuilder application that communicates with a mainframe via an emulator to one using APIs with REST/JSON. I have looked at the examples in the Appeon PowerBuilder 2017 R3 Help and was wondering if the...
Hi everyone I watched a presentation rerun from the Elevate 2018 online - https://bit.ly/2reD3x8 In this clip titled "Demo: New Features of PowerBuilder 2017 R3" I noticed on the presenter's screen the Build number is something later than 1858, whi...
Hi.   One of our customers has provided a web service (Restful API) which returns Json data. They want us to integrate with it to get these data into our application. Is there a way to generate a datawindow from the Json? I guess i need to have ...
Hello community, I am exited with new option to export Datawindow to Json format. Could you please help me to figure out how to achieve the following: 1. Exported field names are different from column names. How to specify/map the Json field names w...
Hi, I am using the JsonGenerator and I am having trouble getting it formatted correctly with my arrays - square brackets are missing This is what I am trying to create {     "userId": "adsf1234",     "dueDate": "2018/02/21",     "items": [ ...
  • Page :
  • 1