-
JOSE WILLIAM ROMERO OLIVOS
- PowerBuilder
- Tuesday, 28 July 2026 08:05 PM UTC
Good morning, everyone. I am using PowerBuilder version 2025.
In this scenario, I am using the `JsonGenerator` object to create JSON.
I would like to know if I can create a main JSON object by using functions that return parts of that JSON, allowing me to reuse code or resources in another JSON (FHIR) file.
I have certain functions or resources that can be used across different main JSON objects, and I want to reuse them to avoid rewriting them.
Example:
JsonGenerator lnv_JsonGeneratorPpal
string encounterJson
lnv_JsonGeneratorPpal.AddItemString(ll_Item_Array,tipoDocumentoldentificacionLabel,tipoDocumentoldentificacionValue)lnv_JsonGeneratorPpal.AddItemString(ll_Item_Array,numDocumentoldentificacionLabel,numDocumentoldentificacionValue)
encounterJson = of_getEncounter('1111111');
I want to be able to add the result returned by the `encounterJson` function to the main JSON, modularize the JSON generation, and reuse the code.
Thank you very much.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.