hi all
Is there any way to create a structure (struct..End_struct) at runtime?
I want to read a json and create a runtime structure to handle it. Am I asking too much?
other suggestions?
Edgar
hi all
Is there any way to create a structure (struct..End_struct) at runtime?
I want to read a json and create a runtime structure to handle it. Am I asking too much?
other suggestions?
Edgar
Hi Edgar,
you can pass variables to Structure_Start and Structure_End as variables and the same with the code that creates columns and indexes.
Hi dennis
I guess he is talking about struct types, not about restructuring a table.
Samuel Pizarro
Edgar
Before we had structs (which are not dynamic at run-time, so you can't do what you are looking for) I used to use Array objects (in conjunction with Enum_Lists, but they are static as well) to do that sort of thing.
You might write something which added items to such a thing based on the received JSON, but in truth, the best way to do this would be by using the cJsonObjects, which are designed for the purpose.
Mike
that would be an anonymous type and should really be supported in the language
you can simply deserialize for example json into an anon object and then access any members of it during runtime
Michael Salzlechner
StarZen Technologies, Inc
http.://www.starzen.com
IT Director at Balloons Everywhere
Development Blog
http://www.salzlechner.com/dev
DataFlex Package Manager (aka Nuget for DataFlex)
http://windowsdeveloper.com/dfPackage
Hi all
Thank you all for your opinions
Edgar